[#645] *: Change the locality condition of the node from the placement

Some software components regulate the way of working with placement arrays
when a local node enters it. In the previous implementation, the locality
criterion was the correspondence between the announced network address
(group) and the address with which the node was configured. However, by
design, network addresses are not unique identifiers of storage nodes in the
system.

Change comparisons by network addresses to comparisons by keys in all
packages with the logic described above. Implement `netmap.AnnouncedKeys`
interface on `cfg` type in the storage node application.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-06 15:17:14 +03:00 committed by Alex Vanin
parent f14987c06d
commit 358e3ed8c4
10 changed files with 62 additions and 58 deletions

View file

@ -87,7 +87,7 @@ func initReputationService(c *cfg) {
remoteLocalTrustProvider := common.NewRemoteTrustProvider(
common.RemoteProviderPrm{
LocalAddrSrc: c,
NetmapKeys: c,
DeadEndProvider: daughterStorageWriterProvider,
ClientCache: c.clientCache,
WriterProvider: localreputation.NewRemoteProvider(
@ -100,7 +100,7 @@ func initReputationService(c *cfg) {
remoteIntermediateTrustProvider := common.NewRemoteTrustProvider(
common.RemoteProviderPrm{
LocalAddrSrc: c,
NetmapKeys: c,
DeadEndProvider: consumerStorageWriterProvider,
ClientCache: c.clientCache,
WriterProvider: intermediatereputation.NewRemoteProvider(