diff --git a/pkg/services/policer/check.go b/pkg/services/policer/check.go index bf67ec4d..06282bd8 100644 --- a/pkg/services/policer/check.go +++ b/pkg/services/policer/check.go @@ -110,7 +110,7 @@ func (p *Policer) processRepNodes(ctx context.Context, requirements *placementRe requirements.needLocalCopy = true shortage-- - } else if nodes[i].IsMaintenance() { + } else if nodes[i].Status().IsMaintenance() { shortage, uncheckedCopies = p.handleMaintenance(nodes[i], checkedNodes, shortage, uncheckedCopies) } else { if status := checkedNodes.processStatus(nodes[i]); status.Processed() { diff --git a/pkg/services/policer/ec.go b/pkg/services/policer/ec.go index 61a65fc2..e822d1c0 100644 --- a/pkg/services/policer/ec.go +++ b/pkg/services/policer/ec.go @@ -106,7 +106,7 @@ func (p *Policer) processECChunk(ctx context.Context, objInfo objectcore.Info, n validPlacement: true, } } - if requiredNode.IsMaintenance() { + if requiredNode.Status().IsMaintenance() { // consider maintenance mode has object, but do not drop local copy p.log.Debug(logs.PolicerConsiderNodeUnderMaintenanceAsOK, zap.String("node", netmap.StringifyPublicKey(requiredNode))) return ecChunkProcessResult{} diff --git a/pkg/services/policer/policer_test.go b/pkg/services/policer/policer_test.go index e353ea42..4e17e98a 100644 --- a/pkg/services/policer/policer_test.go +++ b/pkg/services/policer/policer_test.go @@ -174,7 +174,7 @@ func TestProcessObject(t *testing.T) { nodes[i].SetPublicKey([]byte{byte(i)}) } for _, i := range ti.maintenanceNodes { - nodes[i].SetMaintenance() + nodes[i].SetStatus(netmap.Maintenance) } var policy netmap.PlacementPolicy