[elephant-cvs] CVS update: elephant/src/sleepycat.lisp
blee at common-lisp.net
blee at common-lisp.net
Thu Sep 2 14:47:12 UTC 2004
Update of /project/elephant/cvsroot/elephant/src
In directory common-lisp.net:/tmp/cvs-serv31310/src
Modified Files:
sleepycat.lisp
Log Message:
next-oid fix: bug in counters, they weren't using the parent
transactions and so were dead locking inside of with-transactions
nested transactions are borking -- kword default to
with-transactions should be '*current-transaction*, not
*current-transaction* -- i want to capture the dynamic, not
lexical environment
Date: Thu Sep 2 16:47:11 2004
Author: blee
Index: elephant/src/sleepycat.lisp
diff -u elephant/src/sleepycat.lisp:1.8 elephant/src/sleepycat.lisp:1.9
--- elephant/src/sleepycat.lisp:1.8 Thu Sep 2 09:18:08 2004
+++ elephant/src/sleepycat.lisp Thu Sep 2 16:47:09 2004
@@ -866,7 +866,7 @@
(type boolean txn-nosync txn-sync)))
(defmacro with-transaction ((&key transaction environment
- (parent *current-transaction*)
+ (parent '*current-transaction*)
(retries 100)
dirty-read txn-nosync
txn-nowait txn-sync)
@@ -1078,14 +1078,15 @@
(def-function ("next_counter" %next-counter)
((env :pointer-void)
(db :pointer-void)
+ (parent :pointer-void)
(key array-or-pointer-char)
(key-length :unsigned-int)
(lockid array-or-pointer-char)
(lockid-length :unsigned-int))
:returning :int)
-(defun next-counter (env db key key-length lockid lockid-length)
- (let ((ret (%next-counter env db key key-length lockid lockid-length)))
+(defun next-counter (env db parent key key-length lockid lockid-length)
+ (let ((ret (%next-counter env db parent key key-length lockid lockid-length)))
(if (< ret 0)
(error 'db-error :errno ret)
ret)))
More information about the Elephant-cvs
mailing list