satellite/repair/checker/checker.go: Use number of healthy pieces instead of SegmentHealth for injured segments queue.
We did not test the SegmentHealth function with actual production values, and it turns out that values such as 52 healthy, 35 minimum result in +Inf segment health - so pretty much all segments put into the repair queue have the same health, which means we effectively aren't sorting by health. This change inserts numHealthy as segment health into the database so the segments are ordered as they were before. We need to refine the SegmentHealth function before we can support multi RS. Change-Id: Ief19bbfee3594c5dfe94ca606bc930f05f85ff74
This commit is contained in:
parent
5c34b62bde
commit
75f0f713a3
@ -201,7 +201,7 @@ func (checker *Checker) updateIrreparableSegmentStatus(ctx context.Context, poin
|
||||
// If the segment is suddenly entirely healthy again, we don't need to repair and we don't need to
|
||||
// keep it in the irreparabledb queue either.
|
||||
if numHealthy >= redundancy.MinReq && numHealthy <= repairThreshold && numHealthy < redundancy.SuccessThreshold {
|
||||
segmentHealth := repair.SegmentHealth(int(numHealthy), int(redundancy.MinReq), checker.nodeFailureRate)
|
||||
segmentHealth := float64(numHealthy)
|
||||
_, err = checker.repairQueue.Insert(ctx, &internalpb.InjuredSegment{
|
||||
Path: key,
|
||||
LostPieces: missingPieces,
|
||||
|
Loading…
Reference in New Issue
Block a user