ed.decode prefers servers with most data shards
This commit is contained in:
@@ -149,8 +149,9 @@ func collectEcShards(ctx context.Context, commandEnv *CommandEnv, nodeToEcIndexB
|
|||||||
maxShardCount := 0
|
maxShardCount := 0
|
||||||
var exisitngEcIndexBits erasure_coding.ShardBits
|
var exisitngEcIndexBits erasure_coding.ShardBits
|
||||||
for loc, ecIndexBits := range nodeToEcIndexBits {
|
for loc, ecIndexBits := range nodeToEcIndexBits {
|
||||||
if ecIndexBits.ShardIdCount() > maxShardCount {
|
toBeCopiedShardCount := ecIndexBits.MinusParityShards().ShardIdCount()
|
||||||
maxShardCount = ecIndexBits.ShardIdCount()
|
if toBeCopiedShardCount > maxShardCount {
|
||||||
|
maxShardCount = toBeCopiedShardCount
|
||||||
targetNodeLocation = loc
|
targetNodeLocation = loc
|
||||||
exisitngEcIndexBits = ecIndexBits
|
exisitngEcIndexBits = ecIndexBits
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user