diff options
| author | Ryan Russell <ryanrussell@users.noreply.github.com> | 2022-09-14 14:02:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-14 12:02:33 -0700 |
| commit | dfbd8efd26891d6ef07928b1bab2ec65809c585e (patch) | |
| tree | 4a2b4f080cf59e38378501a7c8b14e3359800bc9 /weed/shell/command_ec_decode.go | |
| parent | f2dde2b1da3739018c3354bc3a4b926e70ca6969 (diff) | |
| download | seaweedfs-dfbd8efd26891d6ef07928b1bab2ec65809c585e.tar.xz seaweedfs-dfbd8efd26891d6ef07928b1bab2ec65809c585e.zip | |
refactor(command_ec_decode): `exisitngEcIndexBits` -> `existingEcInde… (#3674)
refactor(command_ec_decode): `exisitngEcIndexBits` -> `existingEcIndexBits`
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Diffstat (limited to 'weed/shell/command_ec_decode.go')
| -rw-r--r-- | weed/shell/command_ec_decode.go | 8 |
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 |
