mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 01:53:28 +00:00
Recognize loss of follower as step toward loss of quorum
Properly reap the loss of a follower.
This commit is contained in:
parent
5a5f0169a7
commit
bf4f5ad5ae
@ -449,6 +449,7 @@ def set_global(globalname, value):
|
||||
|
||||
cfgstreams = {}
|
||||
def relay_slaved_requests(name, listener):
|
||||
global cfgleader
|
||||
cfgstreams[name] = listener
|
||||
msg = listener.recv(8)
|
||||
while msg:
|
||||
@ -465,6 +466,9 @@ def relay_slaved_requests(name, listener):
|
||||
if 'xid' in rpc:
|
||||
_push_rpc(listener, cPickle.dumps({'xid': rpc['xid']}))
|
||||
msg = listener.recv(8)
|
||||
del cfgstreams[name]
|
||||
if not cfgstreams:
|
||||
cfgleader = True
|
||||
|
||||
|
||||
def stop_leading():
|
||||
|
Loading…
Reference in New Issue
Block a user