[Zodb-checkins] CVS: Zope3/src/zodb/storage - interfaces.py:1.7.4.1

Jeremy Hylton jeremy@zope.com
Sat, 1 Mar 2003 21:33:42 -0500


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv18623/src/zodb/storage

Modified Files:
      Tag: jeremy-atomic-invalidation-branch
	interfaces.py 
Log Message:
Add incomplete note about synchronization to IStorage.


=== Zope3/src/zodb/storage/interfaces.py 1.7 => 1.7.4.1 ===
--- Zope3/src/zodb/storage/interfaces.py:1.7	Tue Feb 25 13:55:03 2003
+++ Zope3/src/zodb/storage/interfaces.py	Sat Mar  1 21:33:40 2003
@@ -40,6 +40,24 @@
 
     This part of the interface should document important concepts like
     what methods must execute in a transaction context.
+
+    Synchronization
+
+    A storage implementation must be thread-safe.  Multiple threads
+    call call storage methods at any time.
+
+    A storage must implement a two-phase commit protocol for updates.
+    Only one transaction can commit at a time.  The storage must
+    guarantee that after a tpcVote() call returns, no other
+    transaction can advance beyond the tpcVote() until the first
+    transaction commits or aborts.  Some storages do not allow more
+    than one storage to advance beyond tpcBegin().
+
+    The load() method must always return the most recently committed
+    data.  A load() method can not run at the same time as tpcFinish()
+    if it would be possible to read inconsistent data.  XXX Need to
+    flesh out the details here.
+    
     """
 
     def close():