From b2422caaef091c5591191697f177c42e117e5f82 Mon Sep 17 00:00:00 2001 From: paul cannon Date: Thu, 22 Dec 2022 18:07:11 -0600 Subject: [PATCH] cmd/tools/segment-verify: log less retry segments When Check == 0 (check all pieces), there is nearly always a piece left in the retry count, so most segments get logged in segments-retry.csv. This change makes it so we require retry>5 before adding to segments-retry.csv (only in the check==0 case). Change-Id: Iaea523c27eb777e3c248c27c7ef5effe77ae54cf --- cmd/tools/segment-verify/service.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/tools/segment-verify/service.go b/cmd/tools/segment-verify/service.go index c224cca38..24998d2b0 100644 --- a/cmd/tools/segment-verify/service.go +++ b/cmd/tools/segment-verify/service.go @@ -457,9 +457,7 @@ func (service *Service) ProcessSegments(ctx context.Context, segments []*Segment for _, segment := range segments { if segment.Status.NotFound > 0 { notFound = append(notFound, segment) - } else if segment.Status.Retry > 0 { - // TODO: should we do a smarter check here? - // e.g. if at least half did find, then consider it ok? + } else if (service.config.Check > 0 && segment.Status.Retry > 0) || segment.Status.Retry > 5 { retry = append(retry, segment) } }