diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2024-11-21 21:17:25 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-21 08:17:25 -0800 |
| commit | a143c888e53d007e7089c71f2c2af7c35b86a55e (patch) | |
| tree | 36df602c71653ed626dbea5fa60b2072c0a6ff8d /weed/shell/command_volume_fix_replication.go | |
| parent | a49d9e020c735459d87f781d9dd2cfebe97e374e (diff) | |
| download | seaweedfs-a143c888e53d007e7089c71f2c2af7c35b86a55e.tar.xz seaweedfs-a143c888e53d007e7089c71f2c2af7c35b86a55e.zip | |
[shell] don't require lock when there are no changes for volume.fix.replication (#6266)
* don't require lock when there are no changes
* revert takeAction
Diffstat (limited to 'weed/shell/command_volume_fix_replication.go')
| -rw-r--r-- | weed/shell/command_volume_fix_replication.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go index 40bc07fce..61c4ac990 100644 --- a/weed/shell/command_volume_fix_replication.go +++ b/weed/shell/command_volume_fix_replication.go @@ -73,12 +73,13 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv, return nil } - if err = commandEnv.confirmIsLocked(args); err != nil { + commandEnv.noLock = *skipChange + takeAction := !*skipChange + + if err = commandEnv.confirmIsLocked(args); takeAction && err != nil { return } - takeAction := !*skipChange - underReplicatedVolumeIdsCount := 1 for underReplicatedVolumeIdsCount > 0 { fixedVolumeReplicas := map[string]int{} |
