[elephant-cvs] CVS elephant/src/db-bdb
ieslick
ieslick at common-lisp.net
Wed Mar 21 14:29:30 UTC 2007
Update of /project/elephant/cvsroot/elephant/src/db-bdb
In directory clnet:/tmp/cvs-serv17716/src/db-bdb
Modified Files:
bdb-transactions.lisp
Log Message:
Fixes submitted by Henrik; some OpenMCL changes
--- /project/elephant/cvsroot/elephant/src/db-bdb/bdb-transactions.lisp 2007/03/04 20:22:47 1.11
+++ /project/elephant/cvsroot/elephant/src/db-bdb/bdb-transactions.lisp 2007/03/21 14:29:30 1.12
@@ -39,22 +39,21 @@
:txn-nowait txn-nowait
:txn-sync txn-sync))))
(declare (type pointer-void txn))
- (let ((result
- (multiple-value-list
- (let ((*current-transaction* (make-transaction-record sc txn))
- (*store-controller* sc))
- (declare (special *current-transaction* *store-controller*))
- (catch 'transaction
- (unwind-protect
- (multiple-value-prog1
- (funcall txn-fn)
- (db-transaction-commit txn
- :txn-nosync txn-nosync
- :txn-sync txn-sync)
- (setq success t))
- (unless success
- (db-transaction-abort txn))))))))
- (unless (and (eq result txn) (not success))
+ (let (result)
+ (let ((*current-transaction* (make-transaction-record sc txn))
+ (*store-controller* sc))
+ (declare (special *current-transaction* *store-controller*))
+ (catch 'transaction
+ (unwind-protect
+ (progn
+ (setf result (multiple-value-list (funcall txn-fn)))
+ (db-transaction-commit txn
+ :txn-nosync txn-nosync
+ :txn-sync txn-sync)
+ (setq success t))
+ (unless success
+ (db-transaction-abort txn)))))
+ (when success
(return (values-list result)))))
finally (error "Too many retries in transaction"))))
More information about the Elephant-cvs
mailing list