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

ieslick ieslick at common-lisp.net
Fri Feb 16 23:02:52 UTC 2007


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

Modified Files:
	bdb-transactions.lisp berkeley-db.lisp package.lisp 
Log Message:
Changed transaction protocol to better support multiple-stores.  Should only effect BDB and not SQL, migration and upgrade fixes, some more debug support; green on Allegro/MacOS BDB and SQlite3

--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-transactions.lisp	2007/02/14 04:36:10	1.7
+++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-transactions.lisp	2007/02/16 23:02:51	1.8
@@ -40,14 +40,15 @@
 					:txn-sync txn-sync))))
 	 (declare (type pointer-void txn))
 	 (let ((result
-		(let ((*current-transaction* txn))
-		  (declare (special *current-transaction*))
+		(let ((*current-transaction* (make-transaction-record sc txn))
+		      (*store-controller* sc))
+		  (declare (special *current-transaction* *store-controller*))
 		  (catch 'transaction
 		    (unwind-protect
 			 (prog1 
 			     (funcall txn-fn)
 			   (db-transaction-commit txn :txn-nosync txn-nosync
-						      :txn-sync txn-sync)
+						  :txn-sync txn-sync)
 			   (setq success t))
 		      (unless success 
 			(db-transaction-abort txn)))))))
--- /project/elephant/cvsroot/elephant/src/db-bdb/berkeley-db.lisp	2007/02/02 23:51:58	1.7
+++ /project/elephant/cvsroot/elephant/src/db-bdb/berkeley-db.lisp	2007/02/16 23:02:51	1.8
@@ -73,7 +73,9 @@
   )
 
 (defmacro txn-default (dvar)
-  `(if ,dvar ,dvar +NULL-VOID+))
+  (let ((dv (gensym)))
+    `(let ((,dv ,dvar))
+       (if ,dv (transaction-object ,dv) +NULL-VOID+))))
 
 ;;
 ;; Constants and Flags
--- /project/elephant/cvsroot/elephant/src/db-bdb/package.lisp	2007/02/16 07:11:02	1.5
+++ /project/elephant/cvsroot/elephant/src/db-bdb/package.lisp	2007/02/16 23:02:51	1.6
@@ -19,6 +19,10 @@
 
 (in-package :cl-user)
 
+(defpackage sleepycat 
+  (:documentation "For legacy upgrades")
+  (:use common-lisp))
+
 (defpackage db-bdb
   (:documentation "A low-level UFFI-based interface to Berkeley
    DB to implement the elephant front-end framework.  Uses the




More information about the Elephant-cvs mailing list