[Zodb-checkins] CVS: ZODB4/src/zodb/storage - interfaces.py:1.5.4.4

Barry Warsaw barry@wooz.org
Wed, 12 Mar 2003 16:43:55 -0500


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

Modified Files:
      Tag: opaque-pickles-branch
	interfaces.py 
Log Message:
Resolve conflicts from HEAD merge


=== ZODB4/src/zodb/storage/interfaces.py 1.5.4.3 => 1.5.4.4 ===
--- ZODB4/src/zodb/storage/interfaces.py:1.5.4.3	Wed Mar 12 16:12:00 2003
+++ ZODB4/src/zodb/storage/interfaces.py	Wed Mar 12 16:43:49 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():
@@ -164,13 +182,13 @@
     def tpcAbort(txn):
         pass
 
-    def pack(t):
-        pass
-
 class IUndoStorage(Interface):
     
     def loadSerial(oid, serial):
-        pass
+        """Return data record for revision `serial` of `oid.`
+
+        Raises POSKeyError if the revisions is not available.
+        """
     
     def undo(txnid, txn):
         pass
@@ -275,4 +293,3 @@
 
 class TransactionTooLargeError(StorageTransactionError):
     """The transaction exhausted some finite storage resource."""
-