Deserialize report_conflicting_keys in 6.3

This commit is contained in:
Balachandar Namasivayam 2020-07-11 23:13:51 -07:00
parent 82862c6b1a
commit c942ee995e
1 changed files with 8 additions and 2 deletions

View File

@ -98,6 +98,9 @@ class ByteBuffer(object):
def get_double(self): def get_double(self):
return struct.unpack("<d", self.get_bytes(8))[0] return struct.unpack("<d", self.get_bytes(8))[0]
def get_bool(self):
return struct.unpack("<?", self.get_bytes(1))[0]
def get_bytes_with_length(self): def get_bytes_with_length(self):
length = self.get_int() length = self.get_int()
return self.get_bytes(length) return self.get_bytes(length)
@ -223,6 +226,8 @@ class CommitInfo(BaseInfo):
self.mutations = mutations self.mutations = mutations
self.read_snapshot_version = bb.get_long() self.read_snapshot_version = bb.get_long()
if protocol_version >= PROTOCOL_VERSION_6_3:
self.report_conflicting_keys = bb.get_bool()
class ErrorGetInfo(BaseInfo): class ErrorGetInfo(BaseInfo):
@ -255,7 +260,8 @@ class ErrorCommitInfo(BaseInfo):
self.mutations = mutations self.mutations = mutations
self.read_snapshot_version = bb.get_long() self.read_snapshot_version = bb.get_long()
if protocol_version >= PROTOCOL_VERSION_6_3:
self.report_conflicting_keys = bb.get_bool()
class UnsupportedProtocolVersionError(Exception): class UnsupportedProtocolVersionError(Exception):
def __init__(self, protocol_version): def __init__(self, protocol_version):