[#306] netmap: Allow to select empty set of nodes

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-12-05 15:30:53 +03:00
parent 0352b5b191
commit f7da6ba99c
Signed by: fyrchik
SSH key fingerprint: SHA256:m/TTwCzjnRkXgnzEx9X92ccxy1CcVeinOgDb3NPWWmg
7 changed files with 43 additions and 15 deletions

View file

@ -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)