From fe2c1c926ff890d64de326b1263ea118d187f797 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Tue, 7 May 2024 14:23:23 +0300 Subject: [PATCH] [#1112] node: Fix race warning for `GetObjectAndWritePayload` Signed-off-by: Anton Nikiforov --- pkg/services/object/get/assemble.go | 2 +- pkg/services/object/get/assembleec.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/services/object/get/assemble.go b/pkg/services/object/get/assemble.go index 548e8e45d..3f4a02c02 100644 --- a/pkg/services/object/get/assemble.go +++ b/pkg/services/object/get/assemble.go @@ -37,6 +37,7 @@ func (r *request) assemble(ctx context.Context) { r.log.Debug(logs.GetTryingToAssembleTheObject) + r.prm.common = r.prm.common.WithLocalOnly(false) assembler := newAssembler(r.address(), r.splitInfo(), r.ctxRange(), r) r.log.Debug(logs.GetAssemblingSplittedObject, @@ -119,7 +120,6 @@ func (r *request) GetObjectAndWritePayload(ctx context.Context, id oid.ID, rng * } p := r.prm - p.common = p.common.WithLocalOnly(false) p.objWriter = w p.rng = rng diff --git a/pkg/services/object/get/assembleec.go b/pkg/services/object/get/assembleec.go index d288ef249..58641c975 100644 --- a/pkg/services/object/get/assembleec.go +++ b/pkg/services/object/get/assembleec.go @@ -35,6 +35,7 @@ func (r *request) assembleEC(ctx context.Context) { r.log.Debug(logs.GetTryingToAssembleTheECObject) + r.prm.common = r.prm.common.WithLocalOnly(false) assembler := newAssemblerEC(r.address(), r.infoEC, r.ctxRange(), r, r.containerSource, r.log) r.log.Debug(logs.GetAssemblingECObject,