Browse Source

stop when dn.parent is nil

fix https://github.com/chrislusf/seaweedfs/issues/473
pull/533/head
Chris Lu 8 years ago
parent
commit
2c7dad589d
  1. 2
      weed/topology/topology_event_handling.go

2
weed/topology/topology_event_handling.go

@ -56,5 +56,7 @@ func (t *Topology) UnRegisterDataNode(dn *DataNode) {
dn.UpAdjustVolumeCountDelta(-dn.GetVolumeCount()) dn.UpAdjustVolumeCountDelta(-dn.GetVolumeCount())
dn.UpAdjustActiveVolumeCountDelta(-dn.GetActiveVolumeCount()) dn.UpAdjustActiveVolumeCountDelta(-dn.GetActiveVolumeCount())
dn.UpAdjustMaxVolumeCountDelta(-dn.GetMaxVolumeCount()) dn.UpAdjustMaxVolumeCountDelta(-dn.GetMaxVolumeCount())
if dn.Parent() != nil {
dn.Parent().UnlinkChildNode(dn.Id()) dn.Parent().UnlinkChildNode(dn.Id())
} }
}
Loading…
Cancel
Save