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

Jeremy Hylton jeremy@zope.com
Wed, 5 Mar 2003 17:15:00 -0500


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

Modified Files:
	interfaces.py 
Log Message:
Merge jeremy-atomic-invalidation-branch.

Change invalidation() APIs to pass a set of oids rather than an
individual oid.  All the oids in one call must be processed
atomically.


=== Zope3/src/zodb/storage/interfaces.py 1.7 => 1.8 ===
--- Zope3/src/zodb/storage/interfaces.py:1.7	Tue Feb 25 13:55:03 2003
+++ Zope3/src/zodb/storage/interfaces.py	Wed Mar  5 17:14:27 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():