Commit 13b54fcc authored by Yoshinori Okuji's avatar Yoshinori Okuji

Update a few comments on the protocol, as it is important to define when a...

Update a few comments on the protocol, as it is important to define when a client node may try to resolve a conflict.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@64 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9143a203
......@@ -124,10 +124,14 @@ ASK_NEW_OIDS = 0x0017
# Answer new object IDs. PM -> C.
ANSWER_NEW_OIDS = 0x8017
# Ask to store an object. C -> S.
# Ask to store an object. Send an OID, an original serial, a current
# transaction ID, and data. C -> S.
ASK_STORE_OBJECT = 0x0018
# Answer if object has been stored. S -> C.
# Answer if an object has been stored. If an object is in conflict,
# a serial of the conflicting transaction is returned. In this case,
# if this serial is newer than the current transaction ID, a client
# node must not try to resolve the conflict. S -> C.
ANSWER_STORE_OBJECT = 0x8018
# Abort a transaction. C -> S
......
......@@ -227,6 +227,19 @@ class Application(object):
for node in nm.getClientNodeList():
nm.remove(node)
# This is a mapping between transaction IDs and information on
# UUIDs of client nodes which issued transactions and objects
# which were stored.
self.transaction_dict = {}
# This is a mapping between object IDs and transaction IDs. Used
# for locking objects against store operations.
self.store_lock_dict = {}
# This is a mapping between object IDs and transactions IDs. Used
# for locking objects against load operations.
self.load_lock_dict = {}
while 1:
em.poll(1)
......
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