Commit 65a6474e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3406b26d
...@@ -40,8 +40,7 @@ Below is timing diagram on how the bug happens on ZODB5: ...@@ -40,8 +40,7 @@ Below is timing diagram on how the bug happens on ZODB5:
# which T1 queues in its _storage._invalidations # which T1 queues in its _storage._invalidations
# T1 retrieves queued invalidations which _includes_ # T1 retrieves queued invalidations which _includes_
# invalidation for transaction that T2 just has committed, # invalidation for transaction that T2 just has committed past @head.
# that goes past @head.
._storage._lock.acquire() ._storage._lock.acquire()
r = _storage._invalidations r = _storage._invalidations
._storage._lock.release() ._storage._lock.release()
...@@ -53,6 +52,14 @@ Below is timing diagram on how the bug happens on ZODB5: ...@@ -53,6 +52,14 @@ Below is timing diagram on how the bug happens on ZODB5:
._cache.invalidate(invalidated) ._cache.invalidate(invalidated)
The program simulates two clients: one (T2) constantly modifies two integer
objects preserving invariant that their values stay equal. The other client
(T1) constatly opens the database and verifies the invariant. T1 forces access
to one of the object to always go through loading from the database, and this
way if live cache becomes stale the bug is observed as invariant breakage.
XXX ZODB4 and ZODB3
[1] https://github.com/zopefoundation/ZODB/blob/5.5.1-29-g0b3db5aee/src/ZODB/Connection.py#L734-L742 [1] https://github.com/zopefoundation/ZODB/blob/5.5.1-29-g0b3db5aee/src/ZODB/Connection.py#L734-L742
[2] https://github.com/zopefoundation/ZODB/blob/5.5.1-29-g0b3db5aee/src/ZODB/mvccadapter.py#L130-L139 [2] https://github.com/zopefoundation/ZODB/blob/5.5.1-29-g0b3db5aee/src/ZODB/mvccadapter.py#L130-L139
""" """
......
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