mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-21 19:10:11 +08:00
fix(volume.fix.replication): adjust volume count, not free volume count (#5479)
This commit is contained in:
@@ -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)
|
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 {
|
if !takeAction {
|
||||||
// adjust free volume count
|
// adjust volume count
|
||||||
dst.dataNode.DiskInfos[replica.info.DiskType].FreeVolumeCount--
|
dst.dataNode.DiskInfos[replica.info.DiskType].VolumeCount++
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,8 +349,8 @@ func (c *commandVolumeFixReplication) fixOneUnderReplicatedVolume(commandEnv *Co
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust free volume count
|
// adjust volume count
|
||||||
dst.dataNode.DiskInfos[replica.info.DiskType].FreeVolumeCount--
|
dst.dataNode.DiskInfos[replica.info.DiskType].VolumeCount++
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user