[#757] ir: Do not exclude node in maintenance mode from netmap

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-10-26 10:36:22 +03:00
parent 9f7c2d8810
commit 121f5c4dd8
2 changed files with 19 additions and 1 deletions

View file

@ -24,6 +24,8 @@ type (
epochStamp
binNodeInfo []byte
maintenance bool
}
)
@ -58,6 +60,7 @@ func (c *cleanupTable) update(snapshot netmap.NetMap, now uint64) {
}
access.binNodeInfo = binNodeInfo
access.maintenance = nmNodes[i].IsMaintenance()
newMap[keyString] = access
}
@ -105,7 +108,7 @@ func (c *cleanupTable) forEachRemoveCandidate(epoch uint64, f func(string) error
defer c.Unlock()
for keyString, access := range c.lastAccess {
if epoch-access.epoch > c.threshold {
if !access.maintenance && epoch-access.epoch > c.threshold {
access.removeFlag = true // set remove flag
c.lastAccess[keyString] = access