Commit 70d14afe authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 65a6474e
......@@ -54,10 +54,32 @@ Below is timing diagram on how the bug happens on ZODB5:
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
(T1) constantly 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.
Here is example failure:
$ taskset -c 1,2 ./zopenrace.py
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "./zopenrace.py", line 136, in T1
t1()
File "./zopenrace.py", line 130, in t1
raise AssertionError("t1: obj1.i (%d) != obj2.i (%d)" % (i1, i2))
AssertionError: t1: obj1.i (147) != obj2.i (146)
Traceback (most recent call last):
File "./zopenrace.py", line 179, in <module>
main()
File "./zopenrace.py", line 174, in main
raise AssertionError('FAIL')
AssertionError: FAIL
XXX ZODB4 and ZODB3
[1] https://github.com/zopefoundation/ZODB/blob/5.5.1-29-g0b3db5aee/src/ZODB/Connection.py#L734-L742
......
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