From bbe95dac8b37fd11eb474acfc60514c2f5b350aa Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Wed, 3 Jul 2024 17:14:47 +0300 Subject: [PATCH] [#1225] engine: Log the error when check object existence Signed-off-by: Anton Nikiforov --- internal/logs/logs.go | 1 + pkg/local_object_storage/engine/put.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/internal/logs/logs.go b/internal/logs/logs.go index 2addc4482..4f0b29124 100644 --- a/internal/logs/logs.go +++ b/internal/logs/logs.go @@ -205,6 +205,7 @@ const ( EngineCouldNotReloadAShard = "could not reload a shard" EngineAddedNewShard = "added new shard" EngineCouldNotPutObjectToShard = "could not put object to shard" + EngineCouldNotCheckObjectExistence = "could not check object existence when put object to shard" EngineErrorDuringSearchingForObjectChildren = "error during searching for object children" EngineCouldNotInhumeObjectInShard = "could not inhume object in shard" EngineStartingRemovalOfLocallyredundantCopies = "starting removal of locally-redundant copies" diff --git a/pkg/local_object_storage/engine/put.go b/pkg/local_object_storage/engine/put.go index 2a78febed..54385910b 100644 --- a/pkg/local_object_storage/engine/put.go +++ b/pkg/local_object_storage/engine/put.go @@ -149,6 +149,11 @@ func (e *StorageEngine) putToShard(ctx context.Context, sh hashedShard, pool uti // object is already found but // expired => do nothing with it res.status = putToShardExists + } else { + e.log.Warn(logs.EngineCouldNotCheckObjectExistence, + zap.Stringer("shard_id", sh.ID()), + zap.String("error", err.Error()), + zap.String("trace_id", tracingPkg.GetTraceID(ctx))) } return // this is not ErrAlreadyRemoved error so we can go to the next shard