diff options
| author | skycope <wings.wyang@gmail.com> | 2024-04-23 21:33:50 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-23 06:33:50 -0700 |
| commit | 6e4b9181f5742b5a71c49ffb8f8e22ed0754ef5f (patch) | |
| tree | 849a181e3ffb5f6e6cd910cd159ac6698c6a2adc /weed/shell/command_volume_tier_move.go | |
| parent | cc2885b4f235c0de7ad2314b732cf4c52b531daf (diff) | |
| download | seaweedfs-6e4b9181f5742b5a71c49ffb8f8e22ed0754ef5f.tar.xz seaweedfs-6e4b9181f5742b5a71c49ffb8f8e22ed0754ef5f.zip | |
fix "volume.fix.replication" move many replications only to one volumeServer (#5522)
Diffstat (limited to 'weed/shell/command_volume_tier_move.go')
| -rw-r--r-- | weed/shell/command_volume_tier_move.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.go index e6cf4ee02..c6364757f 100644 --- a/weed/shell/command_volume_tier_move.go +++ b/weed/shell/command_volume_tier_move.go @@ -5,15 +5,16 @@ import ( "errors" "flag" "fmt" + "io" + "path/filepath" + "sync" + "time" + "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb" "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" "github.com/seaweedfs/seaweedfs/weed/storage/types" "github.com/seaweedfs/seaweedfs/weed/wdclient" - "io" - "path/filepath" - "sync" - "time" "github.com/seaweedfs/seaweedfs/weed/operation" "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" @@ -212,7 +213,7 @@ func (c *commandVolumeTierMove) doVolumeTierMove(commandEnv *CommandEnv, writer hasFoundTarget = true // adjust volume count - dst.dataNode.DiskInfos[string(toDiskType)].VolumeCount++ + addVolumeCount(dst.dataNode.DiskInfos[string(toDiskType)], 1) destServerAddress := pb.NewServerAddressFromDataNode(dst.dataNode) c.queues[destServerAddress] <- volumeTierMoveJob{sourceVolumeServer, vid} |
