diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-01-03 12:25:58 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-01-03 12:25:58 -0800 |
| commit | 9c9ba3c209a4e833727b5e4a797bfdd332b2cb4f (patch) | |
| tree | fa6e8ff3d1b70a20b3c82d96626a77968c2097e3 | |
| parent | 4b5adc60b4869c00e1f3256ac79f8f9e0846b7aa (diff) | |
| download | seaweedfs-9c9ba3c209a4e833727b5e4a797bfdd332b2cb4f.tar.xz seaweedfs-9c9ba3c209a4e833727b5e4a797bfdd332b2cb4f.zip | |
nil related
related to https://github.com/chrislusf/seaweedfs/issues/1676
| -rw-r--r-- | weed/topology/data_node.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 0a4df63d0..eaed51654 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -151,7 +151,10 @@ func (dn *DataNode) GetVolumesById(id needle.VolumeId) (storage.VolumeInfo, erro } func (dn *DataNode) GetDataCenter() *DataCenter { - return dn.Parent().Parent().(*NodeImpl).value.(*DataCenter) + rack := dn.Parent() + dcNode := rack.Parent() + dcValue := dcNode.GetValue() + return dcValue.(*DataCenter) } func (dn *DataNode) GetRack() *Rack { |
