aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_rebuild.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_ec_rebuild.go')
-rw-r--r--weed/shell/command_ec_rebuild.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go
index 8cae77434..cceaa1899 100644
--- a/weed/shell/command_ec_rebuild.go
+++ b/weed/shell/command_ec_rebuild.go
@@ -264,7 +264,8 @@ func (ecShardMap EcShardMap) registerEcNode(ecNode *EcNode, collection string) {
if shardInfo.Collection == collection {
existing, found := ecShardMap[needle.VolumeId(shardInfo.Id)]
if !found {
- existing = make([][]*EcNode, erasure_coding.TotalShardsCount)
+ // Use MaxShardCount (32) to support custom EC ratios
+ existing = make([][]*EcNode, erasure_coding.MaxShardCount)
ecShardMap[needle.VolumeId(shardInfo.Id)] = existing
}
for _, shardId := range erasure_coding.ShardBits(shardInfo.EcIndexBits).ShardIds() {