Browse Source

fix(volume.fix.replication): adjust volume count, not free volume count (#5479)

pull/5481/head
steve.wei 9 months ago
committed by GitHub
parent
commit
67ead9b18f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      weed/shell/command_volume_fix_replication.go

8
weed/shell/command_volume_fix_replication.go

@ -315,8 +315,8 @@ func (c *commandVolumeFixReplication) fixOneUnderReplicatedVolume(commandEnv *Co
fmt.Fprintf(writer, "replicating volume %d %s from %s to dataNode %s ...\n", replica.info.Id, replicaPlacement, replica.location.dataNode.Id, dst.dataNode.Id)
if !takeAction {
// adjust free volume count
dst.dataNode.DiskInfos[replica.info.DiskType].FreeVolumeCount--
// adjust volume count
dst.dataNode.DiskInfos[replica.info.DiskType].VolumeCount++
break
}
@ -349,8 +349,8 @@ func (c *commandVolumeFixReplication) fixOneUnderReplicatedVolume(commandEnv *Co
return err
}
// adjust free volume count
dst.dataNode.DiskInfos[replica.info.DiskType].FreeVolumeCount--
// adjust volume count
dst.dataNode.DiskInfos[replica.info.DiskType].VolumeCount++
break
}
}

Loading…
Cancel
Save