Commit 84bbe60e authored by Jim Fulton's avatar Jim Fulton

Updated ZEO protocol version to reflect addition of

checkCurrentSerialInTransaction.

Add logic to allow new clients to be used with older servers.
parent 689ec314
...@@ -632,6 +632,11 @@ class ClientStorage(object): ...@@ -632,6 +632,11 @@ class ClientStorage(object):
if self._client_label and conn.peer_protocol_version >= "Z310": if self._client_label and conn.peer_protocol_version >= "Z310":
stub.set_client_label(self._client_label) stub.set_client_label(self._client_label)
if conn.peer_protocol_version < "Z3101":
logger.warning("Old server doesn't suppport "
"checkCurrentSerialInTransaction")
self.checkCurrentSerialInTransaction = lambda *args: None
self._oids = [] self._oids = []
self.verify_cache(stub) self.verify_cache(stub)
......
...@@ -242,20 +242,21 @@ class Connection(smac.SizedMessageAsyncConnection, object): ...@@ -242,20 +242,21 @@ class Connection(smac.SizedMessageAsyncConnection, object):
# undoa # undoa
# Doesn't support undo for older clients. # Doesn't support undo for older clients.
# Undone oid info returned by vote. # Undone oid info returned by vote.
# readCurrent #
# Z3101 -- checkCurrentSerialInTransaction
# Protocol variables: # Protocol variables:
# Our preferred protocol. # Our preferred protocol.
current_protocol = "Z310" current_protocol = "Z3101"
# If we're a client, an exhaustive list of the server protocols we # If we're a client, an exhaustive list of the server protocols we
# can accept. # can accept.
servers_we_can_talk_to = ["Z308", "Z309", current_protocol] servers_we_can_talk_to = ["Z308", "Z309", "Z310", current_protocol]
# If we're a server, an exhaustive list of the client protocols we # If we're a server, an exhaustive list of the client protocols we
# can accept. # can accept.
clients_we_can_talk_to = [ clients_we_can_talk_to = [
"Z200", "Z201", "Z303", "Z308", "Z309", current_protocol] "Z200", "Z201", "Z303", "Z308", "Z309", "Z310", current_protocol]
# This is pretty excruciating. Details: # This is pretty excruciating. Details:
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment