From 9544936794298595cfdde1e2b59d156f82cf024a Mon Sep 17 00:00:00 2001 From: paul cannon Date: Tue, 27 Dec 2022 14:51:26 -0600 Subject: [PATCH] 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 --- cmd/tools/segment-verify/verify.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/tools/segment-verify/verify.go b/cmd/tools/segment-verify/verify.go index 714352821..93c773bb6 100644 --- a/cmd/tools/segment-verify/verify.go +++ b/cmd/tools/segment-verify/verify.go @@ -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) {