mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
Fix the attempt to assimilate
In the wake of leader loss, the assimilate attempt was causing one of a couple of bad behaviors, a trace if broken and if it should work, the format of the data payload was incorrect.
This commit is contained in:
parent
61f24f4d8a
commit
97f932b946
@ -263,8 +263,15 @@ def handle_connection(connection, cert, request, local=False):
|
||||
# He needs to bootstrap his configuration and subscribe it to updates
|
||||
|
||||
def try_assimilate(drone):
|
||||
remote = connect_to_collective(None, drone)
|
||||
tlvdata.send(remote, {'operation': 'assimilate', 'name': get_myname(), 'txcount': cfm._txcount})
|
||||
try:
|
||||
remote = connect_to_collective(None, drone)
|
||||
except socket.error:
|
||||
# Oh well, unable to connect, hopefully the rest will be
|
||||
# in order
|
||||
return
|
||||
tlvdata.send(remote, {'collective': {'operation': 'assimilate',
|
||||
'name': get_myname(),
|
||||
'txcount': cfm._txcount}})
|
||||
answer = tlvdata.recv(remote)
|
||||
if 'error' in answer:
|
||||
connect_to_leader(None, None, leader=remote.getpeername()[0])
|
||||
|
Loading…
Reference in New Issue
Block a user