aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/configuration.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-09-12 10:31:53 +0500
committerGitHub <noreply@github.com>2022-09-11 22:31:53 -0700
commit721c6197f9f14fb76b3ccfb77f7a5fe107b874de (patch)
treef5d72c9e21589b642a94925baf665eef12798bcd /weed/topology/configuration.go
parentb834027c5ae072f86f6fc7edcf55c3be1929befb (diff)
downloadseaweedfs-721c6197f9f14fb76b3ccfb77f7a5fe107b874de.tar.xz
seaweedfs-721c6197f9f14fb76b3ccfb77f7a5fe107b874de.zip
skip deltaBeat if dn is zero (#3630)
* skip deltaBeat https://github.com/seaweedfs/seaweedfs/issues/3629 * fix GrpcPort * skip url :0 * skip empty DataCenter or Rack * skip empty heartbeat Ip * dell msg add DataCenter * comment todo * fix
Diffstat (limited to 'weed/topology/configuration.go')
-rw-r--r--weed/topology/configuration.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/weed/topology/configuration.go b/weed/topology/configuration.go
index cb635658f..d9fde4a04 100644
--- a/weed/topology/configuration.go
+++ b/weed/topology/configuration.go
@@ -20,9 +20,8 @@ type topology struct {
DataCenters []dataCenter `xml:"DataCenter"`
}
type Configuration struct {
- XMLName xml.Name `xml:"Configuration"`
- Topo topology `xml:"Topology"`
- ip2location map[string]loc // this is not used any more. leave it here for later.
+ XMLName xml.Name `xml:"Configuration"`
+ Topo topology `xml:"Topology"`
}
func (c *Configuration) String() string {
@@ -33,12 +32,6 @@ func (c *Configuration) String() string {
}
func (c *Configuration) Locate(ip string, dcName string, rackName string) (dc string, rack string) {
- if c != nil && c.ip2location != nil {
- if loc, ok := c.ip2location[ip]; ok {
- return loc.dcName, loc.rackName
- }
- }
-
if dcName == "" {
dcName = "DefaultDataCenter"
}