"Leslie P. Polzer" <s...@viridian-project.de> writes: > I'd be happy to review and apply your patch. It should contain a test > case if that's possible.
OK, here it is. Sorry, I don't have a test case, but I did verify that it now works properly from two separate processes when I now pass :register t to OPEN-STORE. This patch works against what was tip in darcs 3 days ago. If this helps darcs show repo Type: darcs Format: darcs-1.0 Root: /home/ap/Subway/subway-elephant/src/systems/elephant-1.0 Pristine: PlainPristine "_darcs/pristine" Cache: thisrepo:/home/ap/Subway/subway-elephant/src/systems/elephant-1.0, cache:/home/ap/.darcs/cache Default Remote: http://www.common-lisp.net/project/elephant/darcs/elephant-1.0 Num Patches: 416 (Sorry, my darcs-fu is extremely weak, I'm a mercurial-head myself.)
diff -r ee63fca7290f src/systems/elephant-1.0/src/elephant/controller.lisp --- a/src/systems/elephant-1.0/src/elephant/controller.lisp Thu Oct 15 15:41:04 2009 +1100 +++ b/src/systems/elephant-1.0/src/elephant/controller.lisp Fri Oct 16 15:05:08 2009 +1100 @@ -111,13 +111,15 @@ (signal-controller-lost-error instance) (reopen-controller () :report "Re-open the store controller" - (open-controller - (get-controller (db-spec instance))))))) + (let ((controller (get-controller (db-spec instance)))) + (apply #'open-controller controller (controller-opening-args controller))))))) ;; If it's valid and open ((and con (connection-is-indeed-open con)) con) ;; If the controller object exists but is closed, reopen - (t (open-controller con))))) + (t + (let ((controller (get-controller (db-spec instance)))) + (apply #'open-controller controller (controller-opening-args controller))))))) (defun get-controller (spec) "This is used by open-store to fetch or open a controller. @@ -184,6 +186,11 @@ :documentation "Data store initialization functions are expected to initialize :spec on the call to make-instance") + (opening-args :type list + :accessor controller-opening-args + :initarg :controller-opening-args + :documentation "List of keyword arguments passed to the + OPEN-STORE function when opening (or re-opening) a controller.") (db-version :type fixnum :accessor controller-database-version :initform 100) @@ -785,7 +792,8 @@ ;; Ensure that parameters are set (initialize-user-parameters) (let ((controller (get-controller spec))) - (apply #'open-controller controller args) + (setf (controller-opening-args controller) args) + (apply #'open-controller controller (controller-opening-args controller)) (if *store-controller* (progn ;; (warn "Store controller already set so was not updated") ;; this was annoying me diff -r ee63fca7290f src/systems/elephant-1.0/src/elephant/gc.lisp --- a/src/systems/elephant-1.0/src/elephant/gc.lisp Thu Oct 15 15:41:04 2009 +1100 +++ b/src/systems/elephant-1.0/src/elephant/gc.lisp Fri Oct 16 15:05:08 2009 +1100 @@ -362,7 +362,7 @@ "Ignore *store-controller*" (initialize-user-parameters) (let ((controller (get-controller spec))) - (open-controller controller) + (apply #'open-controller controller (controller-opening-args controller)) controller)) (defgeneric temp-spec (type spec)
_______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel