fix: master lose some volumes

This commit is contained in:
shibinbin
2022-04-07 15:18:28 +08:00
parent 3ab2c0e5c0
commit c20e1edd99
3 changed files with 17 additions and 1 deletions

View File

@@ -283,3 +283,14 @@ func (t *Topology) IncrementalSyncDataNodeRegistration(newVolumes, deletedVolume
return
}
func (t *Topology) DataNodeRegistration(dcName, rackName string ,dn *DataNode){
if dn.Parent() != nil{
return
}
// registration to topo
dc := t.GetOrCreateDataCenter(dcName)
rack := dc.GetOrCreateRack(rackName)
rack.LinkChildNode(dn)
glog.Infof("[%s] reLink To topo ", dn.Id())
}