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
This commit is contained in:
Márton Elek 2023-10-19 13:01:13 +02:00 committed by Storj Robot
parent 0c1306780e
commit c031b2ad75

View File

@ -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]
}