Commit 9f7345e4 authored by Vincent Pelletier's avatar Vincent Pelletier

Relax TID checking on storage side.

Strangely, nothing in FileStorage forces a new transaction to start with a
TID higher than previous transaction. Supporting this is required for a
ZODB test to pass, so just do that - with a warning.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1871 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 349afd05
...@@ -175,8 +175,8 @@ class TransactionManager(object): ...@@ -175,8 +175,8 @@ class TransactionManager(object):
""" """
assert node is not None assert node is not None
if tid is not None and tid < self._last_tid: if tid is not None and tid < self._last_tid:
# supplied TID is in the past logging.warn('Transaction began with a decreased TID: %s, ' \
raise protocol.ProtocolError('Invalid TID requested') 'expected at least %s', tid, self._last_tid)
if tid is None: if tid is None:
# give a TID # give a TID
tid = self._nextTID() tid = self._nextTID()
......
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