From 4329c1d38851e4d2a107ee634a39f582da299284 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 1 Oct 2018 15:50:31 -0400 Subject: [PATCH] Have collective start bail out if leader Leader should not relinquish if quorum, so don't bother in such a case. --- confluent_server/confluent/collective/manager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/confluent_server/confluent/collective/manager.py b/confluent_server/confluent/collective/manager.py index bf851376..70275d66 100644 --- a/confluent_server/confluent/collective/manager.py +++ b/confluent_server/confluent/collective/manager.py @@ -535,6 +535,12 @@ def start_collective(): if follower: follower.kill() follower = None + try: + if cfm.cfgstreams and cfm.check_quorum(): + # Do not start if we have quorum and are leader + return + except exc.DegradedCollective: + pass if leader_init.active: # do not start trying to connect if we are # xmitting data to a follower return