Allow to select insufficient number of nodes #167

Merged
fyrchik merged 3 commits from fyrchik/frostfs-sdk-go:fix-policy into master 2023-09-15 13:51:01 +00:00

From https://github.com/nspcc-dev/neofs-sdk-go/issues/354

  1. Put object with REP 2 ... SELECT 4
  2. Some nodes are down, netmap has only 2 nodes now.
  3. Policy selector should not fail.

Currently this is done with always constant strict=false now. In future this flag should be set for container creation in the frostfs-cli.

From https://github.com/nspcc-dev/neofs-sdk-go/issues/354 1. Put object with `REP 2 ... SELECT 4` 2. Some nodes are down, netmap has only 2 nodes now. 3. Policy selector should not fail. Currently this is done with always constant `strict=false` now. In future this flag should be set for container creation in the frostfs-cli.
fyrchik force-pushed fix-policy from de970d9bfa to a252ea8bcd 2023-09-15 11:33:55 +00:00 Compare
fyrchik requested review from storage-core-committers 2023-09-15 11:35:57 +00:00
fyrchik requested review from storage-core-developers 2023-09-15 11:35:57 +00:00
fyrchik requested review from storage-services-committers 2023-09-15 11:35:58 +00:00
fyrchik requested review from storage-services-developers 2023-09-15 11:36:02 +00:00
fyrchik force-pushed fix-policy from a252ea8bcd to 555ccc63b2 2023-09-15 11:48:12 +00:00 Compare
aarifullin reviewed 2023-09-15 12:06:49 +00:00
@ -61,3 +61,3 @@
buckets := c.getSelectionBase(s)
if len(buckets) < bucketCount {
if c.strict && len(buckets) < bucketCount {
Collaborator

The desctiption says

Currently this is done with always constant strict=false now. In future this flag should be set for container creation in the frostfs-cli

But it seems it always was implictly strict=true?

The desctiption says > Currently this is done with always constant strict=false now. In future this flag should be set for container creation in the frostfs-cli But it seems it always was implictly `strict=true`?
Poster
Owner

Yes, we change the behaviour here. This is intentional, to make everything else pick up this change automatically: one can argue it is the user expectation, to GET objects it has previously PUT.
I consider the change backwards compatible, because we only allow some outputs which have previously resulted in error.

Yes, we change the behaviour here. This is intentional, to make everything else pick up this change automatically: one can argue it is the user expectation, to GET objects it has previously PUT. I consider the change backwards compatible, because we only allow some outputs which have previously resulted in error.
aarifullin approved these changes 2023-09-15 12:12:56 +00:00
fyrchik merged commit 555ccc63b2 into master 2023-09-15 13:51:01 +00:00
fyrchik deleted branch fix-policy 2023-09-15 13:51:02 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#167
There is no content yet.