Skip to content

Commit

Permalink
node/object: Allow local Put op with copies number set to 1
Browse files Browse the repository at this point in the history
Although such option setting is redundant, there is no reason to deny
service of these requests.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Dec 5, 2024
1 parent a0a4df1 commit 8dd6a65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pkg/services/object/put/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Check warning on line 146 in pkg/services/object/put/streamer.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/object/put/streamer.go#L143-L146

Added lines #L143 - L146 were not covered by tests

Expand Down

0 comments on commit 8dd6a65

Please sign in to comment.