mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(master): fix the bug that add learner plan's overload is null.#1000578895
Signed-off-by: Wu Huocheng <wuhuocheng@oppo.com>
This commit is contained in:
parent
7ea467d7cb
commit
664f2a9586
@ -1235,6 +1235,27 @@ func (c *Cluster) UpdateMigrateDestination(migratePlan *proto.ClusterPlan, mpPla
|
||||
return err
|
||||
}
|
||||
|
||||
if migratePlan.Type == AddLearner {
|
||||
param := &MetaPartitionPlanUserParams{
|
||||
Mode: migratePlan.Mode,
|
||||
Count: migratePlan.ModeCnt,
|
||||
StartID: migratePlan.StartId,
|
||||
EndID: migratePlan.EndId,
|
||||
SelectType: migratePlan.SelectType,
|
||||
ZoneName: migratePlan.ZoneName,
|
||||
NodeSetID: migratePlan.NodeSetID,
|
||||
SelectTag: migratePlan.SelectTag,
|
||||
AutoPromoteLearner: migratePlan.AutoPromote,
|
||||
}
|
||||
err = c.AddLearnerToDestination(migratePlan, mpPlan, param)
|
||||
if err != nil {
|
||||
log.LogErrorf("AddLearnerToDestination error: %s", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// renew the planed destination meta node.
|
||||
if mpPlan.CrossZone {
|
||||
err = FindMigrateDestRetainZone(migratePlan, mpPlan)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user