mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-08 13:07:45 +01:00
ec shard balancing
This commit is contained in:
1 parent
9d9162ca35
commit
f9d8bd51ad
6 files changed
+630
-164
No files matched your search
@@ -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])
|
||||
|
||||
Reference in new issue
Block a user