Skip to content

Commit

Permalink
update: update metanode or datanode id need drop old one before
Browse files Browse the repository at this point in the history
Signed-off-by: leonrayang <[email protected]>
  • Loading branch information
leonrayang authored and Victor1319 committed Sep 5, 2022
1 parent 598887c commit cc41922
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion master/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@ func (c *Cluster) updateDataNodeBaseInfo(nodeAddr string, id uint64) (err error)
return
}

if err = c.syncDeleteDataNode(dataNode); err != nil {
return
}
dataNode.ID = id
if err = c.syncUpdateDataNode(dataNode); err != nil {
return
Expand All @@ -592,7 +595,9 @@ func (c *Cluster) updateMetaNodeBaseInfo(nodeAddr string, id uint64) (err error)
if metaNode.ID == id {
return
}

if err = c.syncDeleteMetaNode(metaNode); err != nil {
return
}
metaNode.ID = id
if err = c.syncUpdateMetaNode(metaNode); err != nil {
return
Expand Down

0 comments on commit cc41922

Please sign in to comment.