2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-14 09:39:51 +00:00

Fix non-collective quorum check

This commit is contained in:
Jarrod Johnson 2020-08-26 13:54:18 -04:00
parent 46fc4d626d
commit 24a3cbc133

View File

@ -311,7 +311,7 @@ def _rpc_set_group_attributes(tenant, attribmap, autocreate):
def check_quorum():
if isinstance(cfgleader, bool):
raise exc.DegradedCollective()
if (not cfgleader) and len(cfgstreams) < (len(_cfgstore['collective']) // 2):
if (not cfgleader) and len(cfgstreams) < (len(_cfgstore.get('collective', {})) // 2):
# the leader counts in addition to registered streams
raise exc.DegradedCollective()
if cfgleader and not _hasquorum: