Fix ec.rebuild failing on unrepairable volumes instead of skipping (#8632)
* Fix ec.rebuild failing on unrepairable volumes instead of skipping them When an EC volume has fewer shards than DataShardsCount, ec.rebuild would return an error and abort the entire operation. Now it logs a warning and continues rebuilding the remaining volumes. Fixes #8630 * Remove duplicate volume ID in unrepairable log message --------- Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -231,12 +231,7 @@ func (erb *ecRebuilder) rebuildEcVolumes(collection string) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if shardCount < erasure_coding.DataShardsCount {
|
if shardCount < erasure_coding.DataShardsCount {
|
||||||
// Capture variables for closure
|
erb.write("ec volume %d is unrepairable with %d shards (need %d), skipping\n", vid, shardCount, erasure_coding.DataShardsCount)
|
||||||
vid := vid
|
|
||||||
shardCount := shardCount
|
|
||||||
erb.ewg.Add(func() error {
|
|
||||||
return fmt.Errorf("ec volume %d is unrepairable with %d shards", vid, shardCount)
|
|
||||||
})
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user