[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
This commit is contained in:
Konstantin Lebedev 2024-11-21 21:17:25 +05:00 committed by GitHub
parent a49d9e020c
commit a143c888e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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{}