[Zope3-checkins] CVS: ZODB4/src/zodb/storage - base.py:1.29
Jeremy Hylton
jeremy@zope.com
Thu, 15 May 2003 16:59:03 -0400
Update of /cvs-repository/ZODB4/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv2080/storage
Modified Files:
base.py
Log Message:
Extend doc string to mention locking.
=== ZODB4/src/zodb/storage/base.py 1.28 => 1.29 ===
--- ZODB4/src/zodb/storage/base.py:1.28 Thu May 1 15:35:00 2003
+++ ZODB4/src/zodb/storage/base.py Thu May 15 16:59:03 2003
@@ -86,6 +86,19 @@
If the subclass wants to implement IVersionStorage, it must implement
all the methods in that interface.
+
+ Each storage will have two locks that are accessed via lock
+ acquire and release methods bound to the instance. (Yuck.)
+ _lock_acquire / _lock_release (reentrant)
+ _commit_lock_acquire / _commit_lock_release
+
+ The commit lock is acquired in tpcBegin() and released in
+ tpcAbort() and tpcFinish(). It is never acquired with the other
+ lock held.
+
+ The other lock appears to protect _oid and _transaction and
+ perhaps other things. It is always held when load() is called, so
+ presumably the load() implementation should also acquire the lock.
"""
_transaction = None # Transaction that is being committed