mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(master): Optimize the judgment conditions when the bad disk is automatically decommission
. #1000223743 Signed-off-by: zhumingze <zhumingze@oppo.com>
This commit is contained in:
parent
ff730e220a
commit
50177fae9f
@ -5222,11 +5222,6 @@ func (c *Cluster) handleDataNodeBadDisk(dataNode *DataNode) {
|
||||
retry := c.RetryDecommissionDisk(dataNode.Addr, disk.DiskPath)
|
||||
partitions := dataNode.badPartitions(disk.DiskPath, c, false)
|
||||
totalDpCnt := len(partitions)
|
||||
if totalDpCnt == 0 && !retry {
|
||||
// msg := fmt.Sprintf("disk(%v_%v) can be removed", dataNode.Addr, disk.DiskPath)
|
||||
// auditlog.LogMasterOp("DiskDecommission", msg, nil)
|
||||
continue
|
||||
}
|
||||
var ratio float64
|
||||
if totalDpCnt != 0 {
|
||||
ratio = float64(len(disk.DiskErrPartitionList)) / float64(totalDpCnt)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user