mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-21 08:33:23 +00:00
Add comments clarifying non-voting state with respect to security expectations
This commit is contained in:
@@ -782,6 +782,9 @@ async def become_leader(connection):
|
||||
global follower
|
||||
global retrythread
|
||||
global reassimilate
|
||||
# As a non-voting member, this instance should not become leader.
|
||||
# However, a non-voting member is considered equally privileged and trusted
|
||||
# as a voting member
|
||||
if cfm.get_collective_member(get_myname()).get('role', None) == 'nonvoting':
|
||||
log.log({'info': 'Refraining from being leader of collective (nonvoting)',
|
||||
'subsystem': 'collective'})
|
||||
@@ -929,6 +932,9 @@ async def start_collective():
|
||||
for member in sorted(list(cfm.list_collective())):
|
||||
if member == myname:
|
||||
continue
|
||||
# Skip attempting to connect to a nonvoting member, which is disqualified
|
||||
# from being a leader, though it is to be considered as trusted and
|
||||
# privileged as a voting member for database and request forwarding.
|
||||
if cfm.get_collective_member(member).get('role', None) == 'nonvoting':
|
||||
continue
|
||||
if cfm.cfgleader is None:
|
||||
|
||||
@@ -694,6 +694,9 @@ def get_myname():
|
||||
return myname
|
||||
|
||||
def has_quorum():
|
||||
# Count active collective members, ignoring non-voting members
|
||||
# non-voting members are considered equally privileged/trusted as voting members for database
|
||||
# and request forwarding, # just not considered to be important when assessing the current health of availability
|
||||
voters = 0
|
||||
for follower in cfgstreams:
|
||||
if cfgstreams[follower].get('role', None) != 'nonvoting':
|
||||
|
||||
Reference in New Issue
Block a user