forked from TrueCloudLab/frostfs-node
[#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()
|
cancel()
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
shortage--
|
||||||
|
checkedNodes.submitReplicaHolder(nodes[i])
|
||||||
|
} else {
|
||||||
if client.IsErrObjectNotFound(err) {
|
if client.IsErrObjectNotFound(err) {
|
||||||
checkedNodes.submitReplicaCandidate(nodes[i])
|
checkedNodes.submitReplicaCandidate(nodes[i])
|
||||||
continue
|
continue
|
||||||
}
|
} else if isClientErrMaintenance(err) {
|
||||||
|
|
||||||
if isClientErrMaintenance(err) {
|
|
||||||
shortage, uncheckedCopies = p.handleMaintenance(nodes[i], checkedNodes, shortage, uncheckedCopies)
|
shortage, uncheckedCopies = p.handleMaintenance(nodes[i], checkedNodes, shortage, uncheckedCopies)
|
||||||
} else if err != nil {
|
} else {
|
||||||
p.log.Error(logs.PolicerReceiveObjectHeaderToCheckPolicyCompliance,
|
p.log.Error(logs.PolicerReceiveObjectHeaderToCheckPolicyCompliance,
|
||||||
zap.Stringer("object", addr),
|
zap.Stringer("object", addr),
|
||||||
zap.String("error", err.Error()),
|
zap.String("error", err.Error()),
|
||||||
)
|
)
|
||||||
} else {
|
}
|
||||||
shortage--
|
|
||||||
checkedNodes.submitReplicaHolder(nodes[i])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue