aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_encode.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-10 21:32:56 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-10 21:32:56 -0700
commitf9d8bd51ad8cf4597559c3e3e327bbb3432719b7 (patch)
tree67bed513a722b9c89bf559f9eaf9365b58d7bc1f /weed/shell/command_ec_encode.go
parent9d9162ca356932fb8c9ec0322f3a771bbbcc47f5 (diff)
downloadseaweedfs-f9d8bd51ad8cf4597559c3e3e327bbb3432719b7.tar.xz
seaweedfs-f9d8bd51ad8cf4597559c3e3e327bbb3432719b7.zip
ec shard balancing
Diffstat (limited to 'weed/shell/command_ec_encode.go')
-rw-r--r--weed/shell/command_ec_encode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go
index 8b01f6cfc..686849cb8 100644
--- a/weed/shell/command_ec_encode.go
+++ b/weed/shell/command_ec_encode.go
@@ -123,7 +123,7 @@ func generateEcShards(ctx context.Context, grpcDialOption grpc.DialOption, volum
func spreadEcShards(ctx context.Context, commandEnv *CommandEnv, volumeId needle.VolumeId, collection string, existingLocations []wdclient.Location) (err error) {
- allEcNodes, totalFreeEcSlots, err := collectEcNodes(ctx, commandEnv)
+ allEcNodes, totalFreeEcSlots, err := collectEcNodes(ctx, commandEnv, "")
if err != nil {
return err
}
@@ -191,7 +191,7 @@ func parallelCopyEcShardsFromSource(ctx context.Context, grpcDialOption grpc.Dia
err = copyErr
} else {
shardIdChan <- copiedShardIds
- server.freeEcSlot -= len(copiedShardIds)
+ server.addEcVolumeShards(volumeId, collection, copiedShardIds)
}
}(server, startFromShardId, allocated[i])
startFromShardId += uint32(allocated[i])