This commit is contained in:
Chris Lu
2021-07-21 14:38:12 -07:00
parent cc32436d63
commit 7359193e97
8 changed files with 16 additions and 17 deletions

View File

@@ -158,7 +158,7 @@ func (c *commandVolumeFixReplication) fixOverReplicatedVolumes(commandEnv *Comma
func (c *commandVolumeFixReplication) fixUnderReplicatedVolumes(commandEnv *CommandEnv, writer io.Writer, takeAction bool, underReplicatedVolumeIds []uint32, volumeReplicas map[uint32][]*VolumeReplica, allLocations []location, retryCount int) (err error) {
for _, vid := range underReplicatedVolumeIds {
for i:=0;i<retryCount+1;i++{
for i := 0; i < retryCount+1; i++ {
if err = c.fixOneUnderReplicatedVolume(commandEnv, writer, takeAction, volumeReplicas, vid, allLocations); err == nil {
continue
}

View File

@@ -61,7 +61,7 @@ func (c *commandVolumeServerEvacuate) Do(args []string, commandEnv *CommandEnv,
return fmt.Errorf("need to specify volume server by -node=<host>:<port>")
}
for i:=0;i<*retryCount+1;i++{
for i := 0; i < *retryCount+1; i++ {
if err = volumeServerEvacuate(commandEnv, *volumeServer, *skipNonMoveable, *applyChange, writer); err == nil {
return nil
}