forked from TrueCloudLab/frostfs-sdk-go
[#306] netmap: Allow to select empty set of nodes
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
0352b5b191
commit
f7da6ba99c
7 changed files with 43 additions and 15 deletions
|
@ -114,7 +114,7 @@ func (c *context) getSelection(s netmap.Selector) ([]nodes, error) {
|
|||
}
|
||||
|
||||
if len(res) < bucketCount {
|
||||
if len(res) == 0 {
|
||||
if c.strict && len(res) == 0 {
|
||||
return nil, errNotEnoughNodes
|
||||
}
|
||||
bucketCount = len(res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue