Do not log context canceled errors during EC assemble #1540

Merged
fyrchik merged 2 commits from dstepanov-yadro/frostfs-node:fix/do_not_log_ec_assemble_context_canceled into master 2024-12-05 12:39:50 +00:00
Showing only changes of commit 339e47e51c - Show all commits

View file

@ -240,13 +240,11 @@ func (a *assemblerec) tryGetChunkFromLocalStorage(ctx context.Context, ch object
object, err = a.localStorage.Head(ctx, addr, false)
if err != nil && !errors.Is(err, context.Canceled) {
a.log.Warn(ctx, logs.GetUnableToHeadPartECObject, zap.String("node", "local"), zap.Stringer("part_id", objID), zap.Error(err))
return nil
}
} else {
object, err = a.localStorage.Get(ctx, addr)
if err != nil && !errors.Is(err, context.Canceled) {
a.log.Warn(ctx, logs.GetUnableToGetPartECObject, zap.String("node", "local"), zap.Stringer("part_id", objID), zap.Error(err))
return nil
}
}
return object
@ -288,13 +286,11 @@ func (a *assemblerec) tryGetChunkFromRemoteStorage(ctx context.Context, node cli
object, err = a.remoteStorage.headObjectFromNode(ctx, addr, node, false)
if err != nil && !errors.Is(err, context.Canceled) {
a.log.Warn(ctx, logs.GetUnableToHeadPartECObject, zap.String("node", hex.EncodeToString(node.PublicKey())), zap.Stringer("part_id", objID), zap.Error(err))
return nil
}
} else {
object, err = a.remoteStorage.getObjectFromNode(ctx, addr, node)
if err != nil && !errors.Is(err, context.Canceled) {
a.log.Warn(ctx, logs.GetUnableToGetPartECObject, zap.String("node", hex.EncodeToString(node.PublicKey())), zap.Stringer("part_id", objID), zap.Error(err))
return nil
}
}
return object