aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_rebuild.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_rebuild.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_rebuild.go')
-rw-r--r--weed/shell/command_ec_rebuild.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go
index 4b2952793..2131c5649 100644
--- a/weed/shell/command_ec_rebuild.go
+++ b/weed/shell/command_ec_rebuild.go
@@ -115,7 +115,7 @@ func rebuildEcVolumes(commandEnv *CommandEnv, allEcNodes []*EcNode, collection s
return fmt.Errorf("ec volume %d is unrepairable with %d shards\n", vid, shardCount)
}
- sortEcNodesByFreeslotsDecending(allEcNodes)
+ sortEcNodesByFreeslotsDescending(allEcNodes)
if allEcNodes[0].freeEcSlot < erasure_coding.TotalShardsCount {
return fmt.Errorf("disk space is not enough")
@@ -178,14 +178,14 @@ func rebuildOneEcVolume(commandEnv *CommandEnv, rebuilder *EcNode, collection st
func generateMissingShards(grpcDialOption grpc.DialOption, collection string, volumeId needle.VolumeId, sourceLocation pb.ServerAddress) (rebuiltShardIds []uint32, err error) {
err = operation.WithVolumeServerClient(false, sourceLocation, grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
- resp, rebultErr := volumeServerClient.VolumeEcShardsRebuild(context.Background(), &volume_server_pb.VolumeEcShardsRebuildRequest{
+ resp, rebuildErr := volumeServerClient.VolumeEcShardsRebuild(context.Background(), &volume_server_pb.VolumeEcShardsRebuildRequest{
VolumeId: uint32(volumeId),
Collection: collection,
})
- if rebultErr == nil {
+ if rebuildErr == nil {
rebuiltShardIds = resp.RebuiltShardIds
}
- return rebultErr
+ return rebuildErr
})
return
}