diff --git a/weed/topology/data_center.go b/weed/topology/data_center.go index 5ffbe4bb8..26d2de7d3 100644 --- a/weed/topology/data_center.go +++ b/weed/topology/data_center.go @@ -29,7 +29,7 @@ func (dc *DataCenter) GetOrCreateRack(rackName string) *Rack { } } rack := NewRack(rackName) - dc.LinkChildNode(rack) + dc.doLinkChildNode(rack) return rack } diff --git a/weed/topology/rack.go b/weed/topology/rack.go index d388e9c61..c96bf421e 100644 --- a/weed/topology/rack.go +++ b/weed/topology/rack.go @@ -47,7 +47,7 @@ func (r *Rack) GetOrCreateDataNode(ip string, port int, grpcPort int, publicUrl dn.GrpcPort = grpcPort dn.PublicUrl = publicUrl dn.LastSeen = time.Now().Unix() - r.LinkChildNode(dn) + r.doLinkChildNode(dn) for diskType, maxVolumeCount := range maxVolumeCounts { disk := NewDisk(diskType) disk.diskUsages.getOrCreateDisk(types.ToDiskType(diskType)).maxVolumeCount = int64(maxVolumeCount) diff --git a/weed/topology/topology.go b/weed/topology/topology.go index 406ee30f6..6c6fc73a4 100644 --- a/weed/topology/topology.go +++ b/weed/topology/topology.go @@ -267,7 +267,7 @@ func (t *Topology) GetOrCreateDataCenter(dcName string) *DataCenter { } } dc := NewDataCenter(dcName) - t.LinkChildNode(dc) + t.doLinkChildNode(dc) return dc }