aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_decode.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-17 10:18:14 -0700
committerchrislu <chris.lu@gmail.com>2022-09-17 10:18:14 -0700
commit1c79301f89762ed25a431bcb5f4e02858dc02218 (patch)
treed0d6c5c44f7524ec38d7002e393d194769278649 /weed/shell/command_ec_decode.go
parent956ce6416fae66646344782cc7f6f557708eb1f4 (diff)
parent3fc261d27c90fc06c1d555dd998d7535b844a746 (diff)
downloadseaweedfs-1c79301f89762ed25a431bcb5f4e02858dc02218.tar.xz
seaweedfs-1c79301f89762ed25a431bcb5f4e02858dc02218.zip
Merge branch 'master' into message_send
Diffstat (limited to 'weed/shell/command_ec_decode.go')
-rw-r--r--weed/shell/command_ec_decode.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_ec_decode.go b/weed/shell/command_ec_decode.go
index 4c92d1a2f..0aca9e00b 100644
--- a/weed/shell/command_ec_decode.go
+++ b/weed/shell/command_ec_decode.go
@@ -171,13 +171,13 @@ func generateNormalVolume(grpcDialOption grpc.DialOption, vid needle.VolumeId, c
func collectEcShards(commandEnv *CommandEnv, nodeToEcIndexBits map[pb.ServerAddress]erasure_coding.ShardBits, collection string, vid needle.VolumeId) (targetNodeLocation pb.ServerAddress, err error) {
maxShardCount := 0
- var exisitngEcIndexBits erasure_coding.ShardBits
+ var existingEcIndexBits erasure_coding.ShardBits
for loc, ecIndexBits := range nodeToEcIndexBits {
toBeCopiedShardCount := ecIndexBits.MinusParityShards().ShardIdCount()
if toBeCopiedShardCount > maxShardCount {
maxShardCount = toBeCopiedShardCount
targetNodeLocation = loc
- exisitngEcIndexBits = ecIndexBits
+ existingEcIndexBits = ecIndexBits
}
}
@@ -189,7 +189,7 @@ func collectEcShards(commandEnv *CommandEnv, nodeToEcIndexBits map[pb.ServerAddr
continue
}
- needToCopyEcIndexBits := ecIndexBits.Minus(exisitngEcIndexBits).MinusParityShards()
+ needToCopyEcIndexBits := ecIndexBits.Minus(existingEcIndexBits).MinusParityShards()
if needToCopyEcIndexBits.ShardIdCount() == 0 {
continue
}
@@ -222,7 +222,7 @@ func collectEcShards(commandEnv *CommandEnv, nodeToEcIndexBits map[pb.ServerAddr
}
- nodeToEcIndexBits[targetNodeLocation] = exisitngEcIndexBits.Plus(copiedEcIndexBits)
+ nodeToEcIndexBits[targetNodeLocation] = existingEcIndexBits.Plus(copiedEcIndexBits)
return targetNodeLocation, err