From bf4f5ad5ae3074ddba37aecc2b814bbb58e4101d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 22 Jun 2018 16:17:48 -0400 Subject: [PATCH] Recognize loss of follower as step toward loss of quorum Properly reap the loss of a follower. --- confluent_server/confluent/config/configmanager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index a2c31048..c3d5c0de 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -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():