Commit graph

68 commits

Author SHA1 Message Date
Leonard Lyubich
eb3b990812 [#210] subnet: Refactor and document package functionality
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-15 11:52:07 +03:00
Leonard Lyubich
6cb513c976 [#257] Upgrade NeoFS API Go module
New version contains fix for `object.GetRangeResponse` message type.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-05-31 09:47:55 +03:00
Evgenii Stratonikov
1f7fe6864d [#229] netmap: make context private
It isn't used anywhere outside of the package.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-05-25 11:02:51 +03:00
Alex Vanin
7d19718e1d [#168] netmap: Add simple selector benchmark
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin
cdcbaa1677 [#168] netmap: Replace pointer slices with non-pointer slices
- []*Replica => []Replica
 - []*Selector => []Selector
 - []*Filter => []Filter
 - []*NetworkParameter => []NetworkParameter
 - []*Node => []Node

Also introduces `filter.id()`` function to store filters
in numCache map.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Evgenii Stratonikov
fa670ab57a *: Fix linter warnings
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-24 18:49:55 +03:00
Evgenii Stratonikov
ea5da31bd2 [#109] netmap: add 1 more test in JSON
Move `PlacementPolicy_ProcessSelectors` test. It tests how good
nodes were grouped into buckets after selection, but we can still query
full results and check them.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-18 13:50:48 +03:00
Evgenii Stratonikov
feb40146b7 [#109] netmap: describe JSON test format
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-18 13:06:25 +03:00
Evgenii Stratonikov
2f446c8e42 [#109] netmap: convert tests to the json format
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-18 13:06:25 +03:00
Evgenii Stratonikov
3edaf9ecb6 netmap: sort buckets by HRW value
If weights for some buckets are equal, result depends on the
initial positions of buckets in slice. Thus we sort buckets by value
using hash of the first node as a have for the whole bucket.
This is ok, because buckets are already sorted by HRW.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-28 15:59:35 +03:00
Evgenii Stratonikov
3d0df0d068 [#54] tests: unify test generator names
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-01 10:34:54 +03:00
Evgenii Stratonikov
279a5a1e0b [#80] netmap: process subnet in selection
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-26 15:52:08 +03:00
Evgenii Stratonikov
b49404d9b6 [#80] netmap: add NodeInfo.ExitSubnet method
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-26 15:52:08 +03:00
Leonard Lyubich
e7ac7f339e [#82] netmap: Add functionality for working with subnets
* Implement `NodeInfo.EnterSubnet` method which adds node's subnet.
  * Implement `NodeInfo.IterateSubnets` which behaves similar to
  eponymous function from neofs-api-go/v2.
  * Implement `BelongsToSubnet` which checks if `NodeInfo` describes the
  node belonging to a specific subnet.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-25 13:04:24 +03:00
Evgenii Stratonikov
73686827d3 [#60] container: move package from neofs-api-go
Also, remove deprecated methods and types.

Close #60.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-10 10:31:57 +03:00
Evgenii Stratonikov
26c59bfbb3 [#42] netmap: remove deprecated methods
Missed this from #51.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-09 10:01:43 +03:00
Evgenii Stratonikov
76d9835766 [#69] netmap: fix typo in comment
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-09 10:00:21 +03:00
Evgenii Stratonikov
369bd382b3 [#42] netmap: move package from neofs-api-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-28 14:50:33 +03:00