Hello,

   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 sc))
                       (aif (get-cached-instance sc oid) it
                           (multiple-value-bind (class schema)
(get-instance-class sc oid classname)
                           (recreate-instance-using-class 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-thread:sb-thread:with-recursive-lock.
     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.

Thanks
Quan
New patches:

[migration-fix-for-1.0A2
[email protected]**20090212110735
 0.9.1->1.0 alpha2 migration fails when using SBCL. It is caused by that controller-recreate-instance is recursively called in migration process.
  It results in a recursive call for sb-thread:with-mutex. The solution is to replace sb-thread:with-mutex by sb-thread:sb-thread:with-recursive-lock. 
] {
hunk ./src/utils/locks.lisp 41
-  #+sbcl `(sb-thread:with-mutex (,lock) ,@body)
+  #+sbcl `(sb-thread:with-recursive-lock (,lock) ,@body)
}

Context:

[SBCL: ensure that all stores are closed on exit.
Leslie P. Polzer <[email protected]>**20090211084035
 Ignore-this: 94be0e62949d9e9ca863aa70eec6a553
] 
[Move confusing query folder from src to contrib
[email protected]**20090210192606] 
[CLP gensym test exception
[email protected]**20090208230446] 
[Warn on drop data by class redefinition
[email protected]**20090208230424] 
[Move clsql data store into contrib
[email protected]**20090207213032] 
[Promote db-clp to standard-issue DB
[email protected]**20090207212641] 
[Fix serializer bugs on re-opening of store
[email protected]**20090207205919] 
[Fix RBT empty node bug; fix lost proxy trees bug; fix serializer reopen bug; open/close store works
[email protected]**20090207202356] 
[More fixes for reopening a store
[email protected]**20090207183403] 
[Fix clp bugs; partial open-store implementation
[email protected]**20090207181117] 
[db-postmodern: cursor semantics
[email protected]**20090205174924] 
[db-postmodern: hardened type handling
[email protected]**20090205161017] 
[tests for mixed-type btrees
[email protected]**20090205160934] 
[db-postmodern: btree upgrade handling, btree wrappers. WARNING: incompatible store format!
[email protected]**20090205160838] 
[db-postmodern: dup btree value type
[email protected]**20090205155335] 
[db-postmodern: proper transaction handling
[email protected]**20090205155239] 
[postmodern doc update
[email protected]**20090205112036] 
[postmodern documentation update
[email protected]**20090205111642] 
[Better support for (:prebuilt-libraries nil) under win32/SBCL.
Elliott Slaughter <[email protected]>**20090108090553
 
 Elephant can now build DLLs properly under win32/SBCL, even when stored in a directory whose name contains spaces, or on another drive letter. Also doesn't litter *.o files in the current directory when compiling.
] 
[Chun Tian's lispworks 5.1 patch
[email protected]**20090203165530] 
[Fix slot unbound test failures for CLP data store
[email protected]**20090203044202] 
[Initial db-clp implementation contrib
[email protected]**20090202202857] 
[Core elephant prep for clp 
[email protected]**20090126023824] 
[Fix fixnum64 declaration bug
[email protected]**20090126171924] 
[merge conflict resolution 1-26
[email protected]**20090126150411] 
[Allegro compatabiliity 2
[email protected]**20090120205655] 
[Allegro compatibility fixes
[email protected]**20090119223005] 
[Unify DB-LOCK structures for ccl compilation
[email protected]**20090119211557] 
[Clean up test ordering for ccl; compatible with openmcl; fix test bug
[email protected]**20090119160831] 
[Clozure CL support (2 errors left in tests)
[email protected]**20090118234322] 
[TAG ELEPHANT-1-0-A2
[email protected]**20090113201539] 
Patch bundle hash:
749dfd6c16d1614e85671cd8c25f44e21d3dcfee
_______________________________________________
elephant-devel site list
[email protected]
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to