Hello,<br><br> When using the latest 1.0 codes, 0.9.1 -> 1.0 migration fails. The test environment is SBCL, BDB4.7.<br> I can reproduce the issue in 1.0 Alpha2. The same migration test passed in 1.0 Alpha1. <br> So, it is likely a new one in 1.0 Alpha2.<br>
<br> The error message "Deserialization error in map: returning nil for element" is printed when running following codes. <br> (defun migrate-from-legacy (dst src)<br> (map-btree (lambda (classname classidx)<br>
...)<br> (controller-index-table src))<br><br> The debug shows a Recursive Lock exception is triggered in follow codes<br> (defmethod controller-recreate-instance ((sc store-controller) oid &optional classname)<br>
(ele-with-lock ((controller-instance-cache-lock sc))<br> (aif (get-cached-instance sc oid) it<br> (multiple-value-bind (class schema) (get-instance-class sc oid classname)<br>
(recreate-instance-using-class class :from-oid oid :sc sc :schema schema))=<br><br> In 0.9.1->1.0 migration scenaro, the controller-recreate-instance could be recursively called, one for indexed-btree, another for btree-index.<br>
The existing ele-with-lock uses sb-thread:with-mutex to setup the lock, which does not support the recursive scenario.<br><br> The simple fix is to replace sb-thread:with-mutex by sb-thread:sb-thread:with-recursive-lock.<br>
The test passed. The BDB regression test suite is also executed and passed.<br> The patch is attached.<br><br> If this is not the suitable solution, please let me know. <br> <br>Thanks<br>Quan<br> <br>
<br> <br>