cmd/tools/segment-verify: don't double-count notfound
When this branch is followed, `audit.OutcomeFailure` is returned, and `MarkNotFound()` is immediately called again (in `(*NodeVerifier).Verify()`). Calling `MarkNotFound()` twice for the same piece is not correct. Change-Id: I1a2764bc32ed015628fcd9353ac3307f269b4bbd
This commit is contained in:
parent
aec596bb39
commit
9544936794
@ -198,7 +198,6 @@ func (service *NodeVerifier) verifySegment(ctx context.Context, client *piecesto
|
||||
if err != nil {
|
||||
logger.Error("download failed", zap.Error(err))
|
||||
if errs2.IsRPC(err, rpcstatus.NotFound) {
|
||||
segment.Status.MarkNotFound()
|
||||
return audit.OutcomeFailure, nil
|
||||
}
|
||||
if errs2.IsRPC(err, rpcstatus.Unknown) {
|
||||
|
Loading…
Reference in New Issue
Block a user