[Zodb-checkins] CVS: ZODB3/bsddb3Storage/bsddb3Storage - BerkeleyBase.py:1.19.2.2

Barry Warsaw barry@wooz.org
Wed, 11 Sep 2002 14:01:09 -0400


Update of /cvs-repository/ZODB3/bsddb3Storage/bsddb3Storage
In directory cvs.zope.org:/tmp/cvs-serv16969/bsddb3Storage/bsddb3Storage

Modified Files:
      Tag: bdb-nolocks
	BerkeleyBase.py 
Log Message:
Updated some comments.


=== ZODB3/bsddb3Storage/bsddb3Storage/BerkeleyBase.py 1.19.2.1 => 1.19.2.2 ===
--- ZODB3/bsddb3Storage/bsddb3Storage/BerkeleyBase.py:1.19.2.1	Mon Sep  9 18:47:48 2002
+++ ZODB3/bsddb3Storage/bsddb3Storage/BerkeleyBase.py	Wed Sep 11 14:01:08 2002
@@ -43,15 +43,17 @@
     set the attributes below to the desired value.  Then pass this instance to
     the Berkeley storage constructor, using the `config' keyword argument.
 
-    To improve recovery times in case of failures, you should set up a
-    checkpointing policy when you create the database.  Note that the database
-    is automatically, and forcefully, checkpointed twice when it is closed.
-    But an exception during processing (e.g.
+    Berkeley storages need to be checkpointed occasionally, otherwise
+    automatic recover can take a huge amount of time.  You should set up a
+    checkpointing policy which trades off the amount of work done periodically
+    against the recovery time.  Note that the Berkeley environment is
+    automatically, and forcefully, checkpointed twice when it is closed.
 
     The following checkpointing attributes are supported:
 
-    - interval indicates the maximum number of calls to tpc_finish() after
-      which a checkpoint is performed.
+    - interval indicates the approximate number of Berkeley transaction
+      commits and aborts after which a checkpoint is performed.  Berkeley
+      transactions are performed after ZODB aborts, commits, and stores.
 
     - kbytes is passed directly to txn_checkpoint()
 
@@ -285,9 +287,9 @@
         os.unlink(lockfile)
         self._closelog()
 
-    # Useful for debugging
-
     def _docheckpoint(self):
+        # Periodically checkpoint the database.  This is called approximately
+        # once per Berkeley transaction commit or abort.
         config = self._config
         config._counter += 1
         if config._counter > config.interval: