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

ieslick ieslick at common-lisp.net
Wed Apr 26 17:53:44 UTC 2006


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

Modified Files:
	bdb-collections.lisp bdb-controller.lisp sleepycat.lisp 
Log Message:

Significant additions to the 0.6.0 release on the trunk.  Updates to 
documentation, 0.5.0 compliance, final on 0.6.0 features.  There are
one or two BDB interactions on migration to work out but this should
be a nearly code complete 0.6.0 release.  Please start testing and
evaluating this - especially the ability to open and tag 0.5.0 databases.

Features:
- Database version tagging
- Support for 0.5.0 namespaces & databases
- New migration system
- class indexing without slot indexing
- various bug fixes
- reverted fast allegro/sbcl string support to
  allow 0.5.0 databases to work correctly.  I 
  couldn't find a good way to work around this
  without creating infinite headaches
- validated that running db_deadlock will stop all
  lisp freezes that I've encountered.  This has to
  be run each time a DB environment is opened/created
  so eventually should be made part of the open-controller
  functionality for the BDB backend



--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-collections.lisp	2006/02/22 21:03:47	1.5
+++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-collections.lisp	2006/04/26 17:53:44	1.6
@@ -56,7 +56,8 @@
 
 (defmethod (setf get-value) (value key (bt bdb-btree))
   (declare (optimize (speed 3) (safety 0) (space 0)))
-  (with-transaction (:store-controller (get-con bt))
+  (assert (or *auto-commit* (not (eq *current-transaction* 0))))
+;;  (with-transaction (:store-controller (get-con bt))
     (with-buffer-streams (key-buf value-buf)
       (buffer-write-int (oid bt) key-buf)
       (serialize key key-buf)
@@ -64,16 +65,17 @@
       (db-put-buffered (controller-btrees (get-con bt)) 
 		       key-buf value-buf
 		       :auto-commit *auto-commit*)
-      value)))
+      value))
 
 (defmethod remove-kv (key (bt bdb-btree))
   (declare (optimize (speed 3) (space 0) (safety 0)))
-  (with-transaction (:store-controller (get-con bt))
+  (assert (or *auto-commit* (not (eq *current-transaction* 0))))
+;;  (with-transaction (:store-controller (get-con bt))
     (with-buffer-streams (key-buf)
       (buffer-write-int (oid bt) key-buf)
       (serialize key key-buf)
       (db-delete-buffered (controller-btrees (get-con bt)) 
-			  key-buf :auto-commit *auto-commit*))))
+			  key-buf :auto-commit *auto-commit*)))
 
 ;; Secondary indices
 
--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-controller.lisp	2006/03/07 14:12:22	1.6
+++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-controller.lisp	2006/04/26 17:53:44	1.7
@@ -59,9 +59,12 @@
   (let ((env (db-env-create)))
     ;; thread stuff?
     (setf (controller-environment sc) env)
-    (db-env-open env (second (controller-spec sc)) :create t :init-txn t :init-lock t 
+    (db-env-open env (second (controller-spec sc)) 
+		 :create t :init-txn t :init-lock t 
 		 :init-mpool t :init-log t :thread thread
 		 :recover recover :recover-fatal recover-fatal)
+    (db-env-set-timeout env 100000 :set-transaction-timeout t)
+    (db-env-set-timeout env 100000 :set-lock-timeout t)
     (let ((db (db-create env))
 	  (btrees (db-create env))
 	  (indices (db-create env))
--- /project/elephant/cvsroot/elephant/src/db-bdb/sleepycat.lisp	2006/02/19 20:06:03	1.3
+++ /project/elephant/cvsroot/elephant/src/db-bdb/sleepycat.lisp	2006/04/26 17:53:44	1.4
@@ -300,7 +300,7 @@
 		    ((= ,errno 0) (values ,@(rest out-args)))
 		    ,@(if transaction
 			  (list `((or (= ,errno DB_LOCK_DEADLOCK)
-				   (= ,errno DB_LOCK_NOTGRANTED))
+				      (= ,errno DB_LOCK_NOTGRANTED))
 				  (throw 'transaction ,transaction)))
 			  (values))
 		    (t (error 'db-error :errno ,errno))))))))




More information about the Elephant-cvs mailing list