2
0
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:
Jarrod Johnson 2018-06-22 16:17:48 -04:00
parent 5a5f0169a7
commit bf4f5ad5ae

View File

@ -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():