Browse Source

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>
pull/8634/head
Chris Lu 2 days ago
committed by GitHub
parent
commit
5acb4578ab
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      weed/shell/command_ec_rebuild.go

7
weed/shell/command_ec_rebuild.go

@ -231,12 +231,7 @@ func (erb *ecRebuilder) rebuildEcVolumes(collection string) {
continue
}
if shardCount < erasure_coding.DataShardsCount {
// Capture variables for closure
vid := vid
shardCount := shardCount
erb.ewg.Add(func() error {
return fmt.Errorf("ec volume %d is unrepairable with %d shards", vid, shardCount)
})
erb.write("ec volume %d is unrepairable with %d shards (need %d), skipping\n", vid, shardCount, erasure_coding.DataShardsCount)
continue
}

Loading…
Cancel
Save