[elephant-devel] Patch for the migration issue in 1.0 Alpha2
eslick at media.mit.edu
Fri Feb 13 15:13:37 UTC 2009
Sounds right! Pushed. -Ian
On Feb 12, 2009, at 6:21 AM, quan hu wrote:
> When using the latest 1.0 codes, 0.9.1 -> 1.0 migration fails.
> The test environment is SBCL, BDB4.7.
> I can reproduce the issue in 1.0 Alpha2. The same migration test
> passed in 1.0 Alpha1.
> So, it is likely a new one in 1.0 Alpha2.
> The error message "Deserialization error in map: returning nil
> for element" is printed when running following codes.
> (defun migrate-from-legacy (dst src)
> (map-btree (lambda (classname classidx)
> (controller-index-table src))
> The debug shows a Recursive Lock exception is triggered in
> follow codes
> (defmethod controller-recreate-instance ((sc store-controller)
> oid &optional classname)
> (ele-with-lock ((controller-instance-cache-lock
> (aif (get-cached-instance sc oid) it
> (multiple-value-bind (class schema) (get-
> instance-class sc oid classname)
> class :from-oid oid :sc sc :schema schema))=
> In 0.9.1->1.0 migration scenaro, the controller-recreate-
> instance could be recursively called, one for indexed-btree, another
> for btree-index.
> The existing ele-with-lock uses sb-thread:with-mutex to setup
> the lock, which does not support the recursive scenario.
> The simple fix is to replace sb-thread:with-mutex by sb-
> The test passed. The BDB regression test suite is also
> executed and passed.
> The patch is attached.
> If this is not the suitable solution, please let me know.
> elephant-devel site list
> elephant-devel at common-lisp.net
More information about the elephant-devel