Browse Source
[master] update LastLeaderChangeTime for hashicorp raft (#6292)
pull/6299/head
Konstantin Lebedev
4 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
1 additions and
1 deletions
-
weed/server/master_server.go
-
weed/server/raft_hashicorp.go
|
|
@ -191,7 +191,6 @@ func (ms *MasterServer) SetRaftServer(raftServer *RaftServer) { |
|
|
|
} else if raftServer.RaftHashicorp != nil { |
|
|
|
ms.Topo.HashicorpRaft = raftServer.RaftHashicorp |
|
|
|
raftServerName = ms.Topo.HashicorpRaft.String() |
|
|
|
// TODO fix this for hashicorp raft
|
|
|
|
ms.Topo.LastLeaderChangeTime = time.Now() |
|
|
|
} |
|
|
|
ms.Topo.RaftServerAccessLock.Unlock() |
|
|
|
|
|
@ -78,6 +78,7 @@ func (s *RaftServer) monitorLeaderLoop(updatePeers bool) { |
|
|
|
} |
|
|
|
glog.V(0).Infof("is leader %+v change event: %+v => %+v", isLeader, prevLeader, leader) |
|
|
|
prevLeader = leader |
|
|
|
s.topo.LastLeaderChangeTime = time.Now() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|