From c031b2ad75085e6fdba2962f3d856569a21b1ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Thu, 19 Oct 2023 13:01:13 +0200 Subject: [PATCH] segment-verify: stat of reused segment should be set to 0 There are 3 different ways to execute segment verify. When the bucket based segment list is used, the code tries to reuse Segments objects. But without resetting the stat, it will create bad results. (This is not the case of the other type of runs, as there we create arrays in each loop) Change-Id: Ie2d52c7e44088a85d4a3ce541da1c5ff767591d6 --- cmd/tools/segment-verify/service.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tools/segment-verify/service.go b/cmd/tools/segment-verify/service.go index cbfa8a843..e15628c95 100644 --- a/cmd/tools/segment-verify/service.go +++ b/cmd/tools/segment-verify/service.go @@ -486,6 +486,9 @@ func (service *Service) ProcessSegmentsFromCSV(ctx context.Context, segmentSourc } for n, verifySegment := range verifySegments.Segments { segmentsData[n].VerifySegment = verifySegment + segmentsData[n].Status.Found = 0 + segmentsData[n].Status.Retry = 0 + segmentsData[n].Status.NotFound = 0 segments[n] = &segmentsData[n] }