[#799] policer: Refactor method processNodes
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
5be2af881a
commit
6534252c22
1 changed files with 13 additions and 13 deletions
|
@ -132,21 +132,21 @@ func (p *Policer) processNodes(ctx context.Context, requirements *placementRequi
|
|||
|
||||
cancel()
|
||||
|
||||
if err == nil {
|
||||
shortage--
|
||||
checkedNodes.submitReplicaHolder(nodes[i])
|
||||
} else {
|
||||
if client.IsErrObjectNotFound(err) {
|
||||
checkedNodes.submitReplicaCandidate(nodes[i])
|
||||
continue
|
||||
}
|
||||
|
||||
if isClientErrMaintenance(err) {
|
||||
} else if isClientErrMaintenance(err) {
|
||||
shortage, uncheckedCopies = p.handleMaintenance(nodes[i], checkedNodes, shortage, uncheckedCopies)
|
||||
} else if err != nil {
|
||||
} else {
|
||||
p.log.Error(logs.PolicerReceiveObjectHeaderToCheckPolicyCompliance,
|
||||
zap.Stringer("object", addr),
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
} else {
|
||||
shortage--
|
||||
checkedNodes.submitReplicaHolder(nodes[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue