replace https://github.com/seaweedfs/seaweedfs/pull/3621
This commit is contained in:
@@ -258,7 +258,9 @@ func (t *Topology) UnRegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) {
|
||||
}
|
||||
|
||||
func (t *Topology) GetOrCreateDataCenter(dcName string) *DataCenter {
|
||||
for _, c := range t.Children() {
|
||||
t.Lock()
|
||||
defer t.Unlock()
|
||||
for _, c := range t.children {
|
||||
dc := c.(*DataCenter)
|
||||
if string(dc.Id()) == dcName {
|
||||
return dc
|
||||
|
||||
Reference in New Issue
Block a user