etcdserver: export method EtcdServer.leaderChangedNotify (#12378)

This commit is contained in:
Yanhao Mo
2020-10-21 16:21:08 +08:00
parent e897daaebc
commit 6d82778a4e
5 changed files with 25 additions and 13 deletions

View File

@@ -712,7 +712,7 @@ func (s *EtcdServer) linearizableReadLoop() {
ctxToSend := make([]byte, 8)
id1 := s.reqIDGen.Next()
binary.BigEndian.PutUint64(ctxToSend, id1)
leaderChangedNotifier := s.leaderChangedNotify()
leaderChangedNotifier := s.LeaderChangedNotify()
select {
case <-leaderChangedNotifier:
continue