[elephant-cvs] CVS elephant/src/db-bdb

ieslick ieslick at common-lisp.net
Sun Feb 18 10:58:58 UTC 2007


Update of /project/elephant/cvsroot/elephant/src/db-bdb
In directory clnet:/tmp/cvs-serv3903/src/db-bdb

Modified Files:
	bdb-controller.lisp package.lisp 
Log Message:
Provide checkpoint function

--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-controller.lisp	2007/02/17 19:28:53	1.29
+++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-controller.lisp	2007/02/18 10:58:58	1.30
@@ -258,7 +258,20 @@
 (defmethod stop-deadlock-detector ((ctrl bdb-store-controller))
   (when (controller-deadlock-pid ctrl)
     (kill-background-program (controller-deadlock-pid ctrl))))
+
+;;
+;; Enable program-based checkpointing
+;;
   
+(defmethod checkpoint ((sc bdb-store-controller) &key force (time 0) (log-size 0))
+  "Forces a checkpoint of the db and flushes the memory pool to disk.
+   Use keywords ':force t' to write the checkpoint under any
+   condition, ':time N' to checkpoint based on if the number of
+   minutes since the last checkpoint is greater than time and
+   ':log-size N' to checkpoint if the data written to the log is
+   greater than N kilobytes"
+  (db-env-txn-checkpoint (controller-environment sc) log-size time :force force))
+
 ;;
 ;; Take advantage of release 4.4's compact storage feature.  Feature of BDB only
 ;;
--- /project/elephant/cvsroot/elephant/src/db-bdb/package.lisp	2007/02/16 23:02:51	1.6
+++ /project/elephant/cvsroot/elephant/src/db-bdb/package.lisp	2007/02/18 10:58:58	1.7
@@ -45,4 +45,5 @@
   (:import-from :ccl
 		#:byte-length)
   (:export
-   #:optimize-layout))
+   #:optimize-layout
+   #:checkpoint))




More information about the Elephant-cvs mailing list