Commit 233f6eb3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 745941f7
...@@ -136,7 +136,7 @@ class Storage(BaseStorage.BaseStorage, ...@@ -136,7 +136,7 @@ class Storage(BaseStorage.BaseStorage,
def supportsUndo(self): def supportsUndo(self):
return True return True
def supportsTransactionalUndo(self): def supportsTransactionalUndo(self): # TODO remove (ZODB.f595f7e7)
return True return True
def loadEx(self, oid, version): def loadEx(self, oid, version):
......
...@@ -516,12 +516,13 @@ class Application(BaseApplication): ...@@ -516,12 +516,13 @@ class Application(BaseApplication):
tid = txn.getTID() tid = txn.getTID()
transaction_node = txn.getNode() transaction_node = txn.getNode()
invalidate_objects = Packets.InvalidateObjects(tid, txn.getOIDList()) invalidate_objects = Packets.InvalidateObjects(tid, txn.getOIDList())
# NOTE send invalidation to clients
for client_node in self.nm.getClientList(only_identified=True): for client_node in self.nm.getClientList(only_identified=True):
if client_node is transaction_node: if client_node is transaction_node:
client_node.send(Packets.AnswerTransactionFinished(ttid, tid), client_node.send(Packets.AnswerTransactionFinished(ttid, tid),
msg_id=txn.getMessageId()) # NOTE msgid: out-of-order answer msg_id=txn.getMessageId()) # NOTE msgid: out-of-order answer
else: else:
# NOTE notifies clients sequentially & irregardless of whether client was subscribed # NOTE notifies clients irregardless of whether client was subscribed
client_node.send(invalidate_objects) client_node.send(invalidate_objects)
# Unlock Information to relevant storage nodes. # Unlock Information to relevant storage nodes.
......
...@@ -69,7 +69,10 @@ class ClientServiceHandler(MasterHandler): ...@@ -69,7 +69,10 @@ class ClientServiceHandler(MasterHandler):
if tid: if tid:
p = Packets.AskLockInformation(ttid, tid) p = Packets.AskLockInformation(ttid, tid)
for node in node_list: for node in node_list:
node.ask(p, timeout=60) node.ask(p, timeout=60) # NOTE
# NOTE continues in onTransactionCommitted
else: else:
conn.answer(Errors.IncompleteTransaction()) conn.answer(Errors.IncompleteTransaction())
# It's simpler to abort automatically rather than asking the client # It's simpler to abort automatically rather than asking the client
......
...@@ -40,6 +40,7 @@ action_dict = { ...@@ -40,6 +40,7 @@ action_dict = {
'truncate': 'truncate', 'truncate': 'truncate',
} }
# ex 'S2' -> u32
uuid_int = (lambda ns: lambda uuid: uuid_int = (lambda ns: lambda uuid:
(ns[uuid[0]] << 24) + int(uuid[1:]) (ns[uuid[0]] << 24) + int(uuid[1:])
)({str(k)[0]: v for k, v in UUID_NAMESPACES.iteritems()}) )({str(k)[0]: v for k, v in UUID_NAMESPACES.iteritems()})
......
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