2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-28 16:21:40 +00:00

Bump version

With recent collective changes, bump the version to block connection with
older collective members until upgraded.
This commit is contained in:
Jarrod Johnson 2023-08-02 13:43:41 -04:00
parent cbf2cdcdc5
commit bf10e58f00
2 changed files with 5 additions and 4 deletions

View File

@ -88,8 +88,8 @@ def connect_to_leader(cert=None, name=None, leader=None, remote=None, isretry=Fa
if not banner:
return
vers = banner.split()[2]
if vers not in (b'v2', b'v3'):
raise Exception('This instance only supports protocol 2 or 3, synchronize versions between collective members')
if vers != b'v4':
raise Exception('This instance only supports protocol 4, synchronize versions between collective members')
tlvdata.recv(remote) # authpassed... 0..
if name is None:
name = get_myname()
@ -569,7 +569,7 @@ def handle_connection(connection, cert, request, local=False):
'txcount': cfm._txcount})
log.log({'info': 'Connecting to leader due to superior '
'transaction count', 'subsystem': 'collective'})
connection.close()
connection.close() # well this won't work
if not connect_to_leader(
None, None, connection.getpeername()[0]):
if retrythread is None:

View File

@ -131,7 +131,8 @@ def sessionhdl(connection, authname, skipauth=False, cert=None):
authenticated = True
# version 0 == original, version 1 == pickle3 allowed, 2 = pickle forbidden, msgpack allowed
# v3 - filehandle allowed
send_data(connection, "Confluent -- v3 --")
# v4 - schema change and keepalive changes
send_data(connection, "Confluent -- v4 --")
while not authenticated: # prompt for name and passphrase
send_data(connection, {'authpassed': 0})
response = tlvdata.recv(connection)