Browse Source
[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
pull/6288/head
Konstantin Lebedev
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
3 deletions
-
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{} |
|
|
|