Update of /project/elephant/cvsroot/elephant/src/db-bdb In directory clnet:/tmp/cvs-serv13701/src/db-bdb
Modified Files: bdb-collections.lisp bdb-transactions.lisp libberkeley-db.def Log Message: Export btree utilities; implement efficient map operators, reimplement get-instance methods; add test of map-index; better declarations
--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-collections.lisp 2007/02/17 12:13:19 1.20 +++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-collections.lisp 2007/02/20 19:12:58 1.21 @@ -113,13 +113,16 @@ (symbolp index-name) (or (symbolp key-form) (listp key-form))) ;; Can it be that this fails? - (let ((ht (indices bt)) - (index (build-btree-index sc - :primary bt - :key-form key-form))) - (setf (gethash index-name (indices-cache bt)) index) - (setf (gethash index-name ht) index) - (setf (indices bt) ht) + (let ((index + (ensure-transaction (:store-controller sc) + (let ((ht (indices bt)) + (index (build-btree-index sc + :primary bt + :key-form key-form))) + (setf (gethash index-name (indices-cache bt)) index) + (setf (gethash index-name ht) index) + (setf (indices bt) ht) + index)))) (when populate (populate bt index)) index) (error "Invalid index initargs!")))) @@ -150,7 +153,7 @@ (if last-key (cursor-set cursor last-key) (cursor-first cursor)) - (loop for i from 0 upto 1000 + (loop for i from 0 upto 1000 while continue do (multiple-value-bind (valid? k v) (cursor-current cursor) --- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-transactions.lisp 2007/02/20 02:33:59 1.9 +++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-transactions.lisp 2007/02/20 19:12:58 1.10 @@ -47,7 +47,8 @@ (unwind-protect (multiple-value-prog1 (funcall txn-fn) - (db-transaction-commit txn :txn-nosync txn-nosync + (db-transaction-commit txn + :txn-nosync txn-nosync :txn-sync txn-sync) (setq success t)) (unless success --- /project/elephant/cvsroot/elephant/src/db-bdb/libberkeley-db.def 2007/01/20 22:12:17 1.2 +++ /project/elephant/cvsroot/elephant/src/db-bdb/libberkeley-db.def 2007/02/20 19:12:58 1.3 @@ -67,8 +67,11 @@ db_env_get_timeout db_env_set_lk_detect db_env_get_lk_detect + db_env_txn_checkpoint db_env_lock_detect + db_set_error_file db_associate + db_compact never_index db_fake_associate next_counter \ No newline at end of file