- 22 May, 2001 4 commits
-
-
Jeremy Hylton authored
The same effect can be achieved by: db.begin_invalidation() for oid in oids_to_invalidate: db.invalidate(oid) db.finish_invalidation()
-
Jeremy Hylton authored
There are two kinds of callbacks, commit actions and close actions. It is assumed that the use of these callbacks is infrequent. As a result, the implementation used tuples defined as class attributes to avoid creation of instance variables to hold callbacks in the common case. This implementation is complicated because tuples are immutable. Unfortunately, the instance variables were actually created anyway in tpc_abort() and tpc_vote(). This implementation changes the class attributes __onCloseCallbacks and __onCommitCallbacks to default to None. If a callback is registered with an instance, a list is bound to an instance attribute of the same name. When the transaction commits or aborts, the instance attribute is deleted. tpc_vote(): Remove the default arguments since they are unused in the body of the method.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
__init__(): __closed = 0 connect(): In connecting thread, don't continue if __closed is true. close(): __closed = 1
-
- 21 May, 2001 2 commits
-
-
Jeremy Hylton authored
If one thread was committing a transaction and another thread was opening a new DB connection, deadlock could occur. The cause of the deadlock is that tpc_finish() acquires the storage and db locks in a different order than DB.open(). As a result, if each starts at the same time and gets one of the two locks it needs, the system will be deadlocked. The solution is to enforce a consistent locking order. If a thread is going to hold the DB lock and the storage lock, it MUST acquire the DB lock first. This patch implements that locking order for the invalidation in tpc_finish(). The DB object gets methods called begin_invalidation() and finish_invalidation() that acquire and release the DB lock respectively. Before the Connection calls tpc_finish() on the storage, it calls begin_invalidation(). This guarantees that the DB acquired before the storage lock. When the invalidation phase is over, the Connection calls end_invalidation() to release the DB lock. This is an optimization. It could wait until tpc_finish() returns, but we know that the DB will not be used again for the rest of the tpc_finish() and tpc_finish() could take a long time. Specific changes: DB.py begin_invalidation(): Added. finish_invalidation(): Added. invalidate(): Remove locking. invalidateMany(): Add comment about how it should be used. Connection.py tpc_finish(): Don't pass second argument to storage's tpc_finish() when committing a transaction with no data. Add call to begin_invalidation() before calling storage's tpc_finish(). _invalidate_sub(): Remove empty, unnecessary method. _invalidating_invalidating(): Add call to finish_invalidation() after last call to DB's invalidate().
-
Evan Simpson authored
-
- 20 May, 2001 2 commits
-
-
Jim Fulton authored
Eventually, we should add registration for the other flavors too. This will require deciding how to specify the II, IO, OI variants. ;)
-
Jim Fulton authored
Fixed a type that prevented import. Changed interface registration to take advantage of the fact that we have classes.
-
- 18 May, 2001 1 commit
-
-
Jeremy Hylton authored
-
- 17 May, 2001 1 commit
-
-
Shane Hathaway authored
-
- 16 May, 2001 1 commit
-
-
Jeremy Hylton authored
Fix bug reported by John D. Heintz.
-
- 14 May, 2001 1 commit
-
-
Jeremy Hylton authored
"supportsTransactionalUndo()" method. XXX untested XXX This mechanism for feature evolutional doesn't seem right, because it because a morass of backwards compatibility issues. I'd rather see the test by one of presence/absence of an attribute or a base class.
-
- 10 May, 2001 3 commits
-
-
Jeremy Hylton authored
storage in all their many flavors. This fixes a conflict resolution bug with subtransactions. XXX Commit same change of zope-2_3-branch. A related change in store() is to call _handle_serial() *after* putting new objects in the cache. This simplifies the logic of _handle_serial() a bit, because every object should be in the cache.
-
Jeremy Hylton authored
sub-transactions XXX Need to apply effbot's lambda-refactoring pattern
-
Jeremy Hylton authored
-
- 09 May, 2001 12 commits
-
-
Jeremy Hylton authored
Use types module rather than type(). Fix indentation nit.
-
Jeremy Hylton authored
misnamed, because it's also the min_connect_poll and it makes the tests run much faster by waiting for a shorter period of time between connect attempts.)
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Add makeTestSuite() helper that replaces clunky unittest mechanisms.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
any recent updates are written to the file. Remove seek() and tell() at the beginning of read_index() because their results are not used. Add main() that prints the contents a cache file when executed as a script. Add a log call when the cache is being read.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Add optional cache_size argument.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
- 08 May, 2001 10 commits
-
-
Jeremy Hylton authored
Also print # conflicts for each test (appears to be zero).
-
Jeremy Hylton authored
different depending on whether the version is different.
-
Jeremy Hylton authored
The invalidated oids (and versions) get written to the tempfile, and are invalidated during the tpc_finish().
-
Jeremy Hylton authored
separate class
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Support for using basic multi framework with other run() functions.
-
Jeremy Hylton authored
XXX The two cache invalidation tests fails currently.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
storage id
-
- 02 May, 2001 3 commits
-
-
Jeremy Hylton authored
The cdata and cver had been swapped, causing all undos to fail, because the version was compared to a pickle.
-
Jeremy Hylton authored
checkBuggyResolve2() -- _p_resolveConflict takes too few args checkUndoConflictResolution() -- make sure conflict resolution is invoked properly during transactional undo checkUndoUnresolvable() -- make sure transactional undo can cope with failed conflict resolution
-
Jeremy Hylton authored
-