From 8dd6a65702bda0c8ba5d7afb1918d96e67e6c7bd Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 5 Dec 2024 11:00:39 +0300 Subject: [PATCH] node/object: Allow local Put op with copies number set to 1 Although such option setting is redundant, there is no reason to deny service of these requests. Signed-off-by: Leonard Lyubich --- CHANGELOG.md | 1 + pkg/services/object/put/streamer.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17a1ed3ace..fa3d5a3460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Changelog for NeoFS Node - False-negative object PUT from container node with set copies number (#3042) ### Changed +- Local object PUT op with copies number set to 1 is allowed now (#3042) ### Removed diff --git a/pkg/services/object/put/streamer.go b/pkg/services/object/put/streamer.go index df0ca47b39..a1ffaeba4d 100644 --- a/pkg/services/object/put/streamer.go +++ b/pkg/services/object/put/streamer.go @@ -141,7 +141,7 @@ func (p *Streamer) initTarget(prm *PutInitPrm) error { func (p *Streamer) preparePrm(prm *PutInitPrm) error { localOnly := prm.common.LocalOnly() - if localOnly && prm.copiesNumber > 0 { + if localOnly && prm.copiesNumber > 1 { return errors.New("storage of multiple object replicas is requested for a local operation") }