[Zodb-checkins] CVS: ZODB4/src/zodb/storage - base.py:1.7
Barry Warsaw
barry@wooz.org
Thu, 23 Jan 2003 14:50:00 -0500
Update of /cvs-repository/ZODB4/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv4051
Modified Files:
base.py
Log Message:
Give BaseStorage a default implementation of _clear_temp() and remove
the one in BerkeleyBase, since it doesn't care about _clear_temp().
=== ZODB4/src/zodb/storage/base.py 1.6 => 1.7 ===
--- ZODB4/src/zodb/storage/base.py:1.6 Wed Jan 22 14:21:06 2003
+++ ZODB4/src/zodb/storage/base.py Thu Jan 23 14:49:57 2003
@@ -142,6 +142,11 @@
def supportsVersions(self):
return False
+ def _clear_temp(self):
+ # Called by tpc_begin(), tpc_abort(), and tpc_finish(), this should be
+ # overridden in storages to clear out any temporary state.
+ pass
+
def tpc_abort(self, transaction):
self._lock_acquire()
try:
@@ -256,8 +261,8 @@
def filter(desc, spec=specification.items()):
for k, v in spec:
if desc.get(k) != v:
- return 0
- return 1
+ return False
+ return True
else:
filter = None
return self.undoLog(first, last, filter)
@@ -636,14 +641,6 @@
BSDDB transaction.
"""
self._transaction.abort()
-
- def _clear_temp(self):
- """Called from BaseStorage.tpc_abort(), BaseStorage.tpc_begin(),
- BaseStorage.tpc_finish(), this clears out the temporary log file
- """
- # BAW: no-op this since the right CommitLog file operations are
- # performed by the methods in the derived storage class.
- pass
def close(self):
"""Close the storage.