[Checkins] [zopefoundation/ZODB] 4a6b02: mvccadapter: check if the last TID changed without...
Julien Muchembled
noreply at github.com
Thu Jun 11 11:37:18 CEST 2020
Branch: refs/heads/master
Home: https://github.com/zopefoundation/ZODB
Commit: 4a6b0283f61427c7a2d8086a271bcdfb1cb53593
https://github.com/zopefoundation/ZODB/commit/4a6b0283f61427c7a2d8086a271bcdfb1cb53593
Author: Julien Muchembled <jm at nexedi.com>
Date: 2020-06-09 (Tue, 09 Jun 2020)
Changed paths:
M src/ZODB/FileStorage/tests.py
M src/ZODB/interfaces.py
M src/ZODB/mvccadapter.py
M src/ZODB/tests/testConnection.py
M src/ZODB/tests/testmvcc.py
Log Message:
-----------
mvccadapter: check if the last TID changed without invalidation
Since commit b5895a5c23309ff2dfe8fd853b838a0c5e349210 ("mvccadapter:
fix race with invalidations when starting a new transaction"),
a ZEO test fails as follows:
File "src/ZEO/tests/drop_cache_rather_than_verify.txt", line 114, in drop_cache_rather_than_verify.txt
Failed example:
conn.root()[1].x
Expected:
6
Got:
1
Earlier in the test, the ZEO server is restarted and then another
client commits. When disconnected, the first client does not receive
invalidations anymore and the connection gets stuck in the past until
there's a new commit after it reconnected. It was possible to make the
test pass with the following patch:
--- a/src/ZEO/ClientStorage.py
+++ b/src/ZEO/ClientStorage.py
@@ -357,6 +357,7 @@ def notify_connected(self, conn, info):
# invalidate our db cache
if self._db is not None:
+ self._db.invalidate(self.lastTransaction(), ())
self._db.invalidateCache()
logger.info("%s %s to storage: %s",
Other implementations like NEO are probably affected the same way.
Rather than changing interfaces in a backward-incompatible way,
this commit revert to the original behaviour, and all the changes
that were done in existing tests are reverted.
However, the interfaces are clarified about the fact that storage
implementations must update at a precise moment the value that is
returned by lastTransaction(): just after invalidate() or
tpc_finish callback.
Commit: 181fa3704b3bc2df0b12672cff24bd4c96f7bbfb
https://github.com/zopefoundation/ZODB/commit/181fa3704b3bc2df0b12672cff24bd4c96f7bbfb
Author: Julien Muchembled <jm at nexedi.com>
Date: 2020-06-10 (Wed, 10 Jun 2020)
Changed paths:
M CHANGES.rst
Log Message:
-----------
changelog: pull request #307
Compare: https://github.com/zopefoundation/ZODB/compare/5ce50c3832e9...181fa3704b3b
More information about the checkins
mailing list