forked from TrueCloudLab/frostfs-api-go
[#356] netmap: Document IterateSubnets
behavior with duplicate keys
Node attributes must be key-unique. In current implementation `IterateSubnets` doesn't monitor the uniqueness of keys. Declare undefined behavior of `IterateSubnets` for non-unique attribute keys. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
5d99e697aa
commit
dfb780a2b6
1 changed files with 2 additions and 0 deletions
|
@ -118,6 +118,8 @@ var errNoSubnets = errors.New("no subnets")
|
||||||
// IterateSubnets iterates over all subnets the node belongs to and passes the IDs to f.
|
// IterateSubnets iterates over all subnets the node belongs to and passes the IDs to f.
|
||||||
// Handler must not be nil.
|
// Handler must not be nil.
|
||||||
//
|
//
|
||||||
|
// Subnet attributes are expected to be key-unique, otherwise undefined behavior.
|
||||||
|
//
|
||||||
// If f returns ErrRemoveSubnet, then removes subnet entry. Note that this leads to an instant mutation of NodeInfo.
|
// If f returns ErrRemoveSubnet, then removes subnet entry. Note that this leads to an instant mutation of NodeInfo.
|
||||||
// Breaks on any other non-nil error and returns it.
|
// Breaks on any other non-nil error and returns it.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue