[Zodb-checkins] CVS: StandaloneZODB/bsddb3Storage/bsddb3Storage - CommitLog.py:1.10.2.2

Barry Warsaw barry@wooz.org
Thu, 22 Aug 2002 17:56:46 -0400


Update of /cvs-repository/StandaloneZODB/bsddb3Storage/bsddb3Storage
In directory cvs.zope.org:/tmp/cvs-serv14684/lib/python/bsddb3Storage

Modified Files:
      Tag: bsddb3Storage-picklelog-branch
	CommitLog.py 
Log Message:
write_object(): This writes the `x' opcode instead of `o'.

next(): allow for the `x' opcode.


=== StandaloneZODB/bsddb3Storage/bsddb3Storage/CommitLog.py 1.10.2.1 => 1.10.2.2 ===
--- StandaloneZODB/bsddb3Storage/bsddb3Storage/CommitLog.py:1.10.2.1	Wed Apr 17 16:35:38 2002
+++ StandaloneZODB/bsddb3Storage/bsddb3Storage/CommitLog.py	Thu Aug 22 17:56:46 2002
@@ -341,6 +341,8 @@
     #           actually higher level API method that write essentially the
     #           same record with some of the elements defaulted to the empty
     #           string or the "all-zeros" string.
+    #     'x' - Like 'o' but might have slightly different semantics in the
+    #           individual databases.
     #     'v' - new version record, consisting of a version string and a
     #           version id
     #     'd' - discard version, consisting of a version id
@@ -383,7 +385,7 @@
         # logging them, we don't need to store the pickle data here.  Instead,
         # we'll write the list of oids referenced by the data, which will be
         # useful during _finish()
-        self._append('o', (oid, vid, nvrevid, '', refdoids, prevrevid))
+        self._append('x', (oid, vid, nvrevid, '', refdoids, prevrevid))
 
     def write_nonversion_object(self, oid, lrevid, prevrevid, zero='\0'*8):
         # Write zeros for the vid and nvrevid since we're storing this object
@@ -419,6 +421,6 @@
             key, data = rec
         except ValueError:
             raise LogCorruptedError, 'incomplete record'
-        if key not in 'ovdr':
+        if key not in 'xovdr':
             raise LogCorruptedError, 'bad record key: %s' % key
         return key, data