diff --git a/pkg/storage/segments/repairer.go b/pkg/storage/segments/repairer.go index bab227bfc..9b58474ac 100644 --- a/pkg/storage/segments/repairer.go +++ b/pkg/storage/segments/repairer.go @@ -216,16 +216,17 @@ func (repairer *Repairer) Repair(ctx context.Context, path storj.Path) (err erro mon.FloatVal("healthy_ratio_after_repair").Observe(healthyRatioAfterRepair) // if partial repair, include "unhealthy" pieces that are not duplicates + revisedPointerPieces := healthyPieces if healthyLength < pointer.Remote.Redundancy.SuccessThreshold { for _, p := range unhealthyPieces { if _, ok := healthyMap[p.GetPieceNum()]; !ok { - healthyPieces = append(healthyPieces, p) + revisedPointerPieces = append(revisedPointerPieces, p) } } } // Update the remote pieces in the pointer - pointer.GetRemote().RemotePieces = healthyPieces + pointer.GetRemote().RemotePieces = revisedPointerPieces // Update the segment pointer in the metainfo return repairer.metainfo.Put(ctx, path, pointer)