mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(master): support adjusting the weight of the previous decommission.
close:#1000234137 Signed-off-by: shuqiang-zheng <zhengshuqiang@oppo.com>
This commit is contained in:
parent
fb36f0f98b
commit
d22301841b
@ -1312,6 +1312,11 @@ func (partition *DataPartition) MarkDecommissionStatus(srcAddr, dstAddr, srcDisk
|
||||
) (err error) {
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), proto.ErrPerformingDecommission.Error()) &&
|
||||
partition.DecommissionType == ManualDecommission && partition.DecommissionWeight < weight {
|
||||
partition.DecommissionWeight = weight
|
||||
c.syncUpdateDataPartition(partition)
|
||||
}
|
||||
msg := fmt.Sprintf("dp(%v) mark decommission status failed", partition.decommissionInfo())
|
||||
auditlog.LogMasterOp("DataPartitionDecommission", msg, err)
|
||||
}
|
||||
|
||||
@ -526,6 +526,9 @@ func (dd *DecommissionDisk) GetDecommissionDiskRetryOverLimitDP(c *Cluster) []ui
|
||||
for _, vol := range vols {
|
||||
partitions := vol.dataPartitions.clonePartitions()
|
||||
for _, dp := range partitions {
|
||||
if dp.IsDiscard {
|
||||
continue
|
||||
}
|
||||
retryTimes := dp.getRetryTimesRecordByDiskPath(dd.SrcAddr + "_" + dd.DiskPath)
|
||||
if retryTimes > retryLimit {
|
||||
retryOverLimitDps = append(retryOverLimitDps, dp.PartitionID)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user