aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/command/master.go2
-rw-r--r--weed/wdclient/masterclient.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/master.go b/weed/command/master.go
index bf5f83875..74c170395 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -145,7 +145,7 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
go func() {
time.Sleep(1500 * time.Millisecond)
if ms.Topo.RaftServer.Leader() == "" && ms.Topo.RaftServer.IsLogEmpty() && isTheFirstOne(myMasterAddress, peers) {
- if ms.MasterClient.FindLeader(myMasterAddress) == "" {
+ if ms.MasterClient.FindLeaderFromOtherPeers(myMasterAddress) == "" {
raftServer.DoJoinCommand()
}
}
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go
index 7b0f73ce9..60753e582 100644
--- a/weed/wdclient/masterclient.go
+++ b/weed/wdclient/masterclient.go
@@ -52,7 +52,7 @@ func (mc *MasterClient) KeepConnectedToMaster() {
}
}
-func (mc *MasterClient) FindLeader(myMasterAddress string) (leader string) {
+func (mc *MasterClient) FindLeaderFromOtherPeers(myMasterAddress string) (leader string) {
for _, master := range mc.masters {
if master == myMasterAddress {
continue