[Zodb-checkins] CVS: Packages/bsddb3Storage - BerkeleyBase.py:1.2

barry@digicool.com barry@digicool.com
Thu, 29 Mar 2001 19:16:10 -0500 (EST)


Update of /cvs-repository/Packages/bsddb3Storage
In directory korak:/tmp/cvs-serv12508

Modified Files:
	BerkeleyBase.py 
Log Message:
_closelog(): Moved here from Minimal since it's useful for both the
Minimal storage and the Full storage.



--- Updated File BerkeleyBase.py in package Packages/bsddb3Storage --
--- BerkeleyBase.py	2001/03/16 22:26:17	1.1
+++ BerkeleyBase.py	2001/03/30 00:16:09	1.2
@@ -24,7 +24,8 @@
 # are overridden here, some of which are not.
 from ZODB.BaseStorage import BaseStorage
 
-__version__ ='$Revision$'[11:-2]
+# $Revision$
+__version__ = '0.1'
 
 
 
@@ -77,6 +78,15 @@
         # Initialize the object id counter.
         self._init_oid()
 
+    def _closelog(self):
+        if self._commitlog:
+            self._commitlog.finish()
+            # JF: unlinking might be too inefficient.  JH: might use mmap
+            # files.  BAW: maybe just truncate the file, or write a length
+            # into the headers and just zero out the length.
+            self._commitlog.close(unlink=1)
+            self._commitlog = None
+        
     def _setupDB(self, name, flags=0):
         """Open an individual database with the given flags.