Do regular checks for healing status while scanning (#19946)

This commit is contained in:
Klaus Post
2024-06-18 09:11:04 -07:00
committed by GitHub
parent eb990f64a9
commit 2f9018f03b
10 changed files with 214 additions and 659 deletions
+2 -1
View File
@@ -381,7 +381,7 @@ func (er erasureObjects) nsScanner(ctx context.Context, buckets []BucketInfo, wa
}
// Collect disks we can use.
disks, _ := er.getOnlineDisksWithHealing(false)
disks, healing := er.getOnlineDisksWithHealing(false)
if len(disks) == 0 {
scannerLogIf(ctx, errors.New("data-scanner: all drives are offline or being healed, skipping scanner cycle"))
return nil
@@ -497,6 +497,7 @@ func (er erasureObjects) nsScanner(ctx context.Context, buckets []BucketInfo, wa
if cache.Info.Name == "" {
cache.Info.Name = bucket.Name
}
cache.Info.SkipHealing = healing
cache.Info.NextCycle = wantCycle
if cache.Info.Name != bucket.Name {
cache.Info = dataUsageCacheInfo{