mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-14 10:08:35 +02:00
ed.decode prefers servers with most data shards
This commit is contained in:
1 parent
a18f62bbe7
commit
1ad34a2487
1 file changed
+3
-2
@@ -149,8 +149,9 @@ func collectEcShards(ctx context.Context, commandEnv *CommandEnv, nodeToEcIndexB
|
||||
maxShardCount := 0
|
||||
var exisitngEcIndexBits erasure_coding.ShardBits
|
||||
for loc, ecIndexBits := range nodeToEcIndexBits {
|
||||
if ecIndexBits.ShardIdCount() > maxShardCount {
|
||||
maxShardCount = ecIndexBits.ShardIdCount()
|
||||
toBeCopiedShardCount := ecIndexBits.MinusParityShards().ShardIdCount()
|
||||
if toBeCopiedShardCount > maxShardCount {
|
||||
maxShardCount = toBeCopiedShardCount
|
||||
targetNodeLocation = loc
|
||||
exisitngEcIndexBits = ecIndexBits
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user