[#1382] policer: Replace deprecated methods
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
b807d8c400
commit
1e7f9909da
3 changed files with 3 additions and 3 deletions
|
@ -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() {
|
||||
|
|
|
@ -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{}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue