Community
Participate
Working Groups
I just encountered the following exception with H2 DB in branching-ranges mode: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.util.ImplementationError: SELECT cdo_version, cdo_created, cdo_revised, cdo_resource, cdo_container, cdo_feature, name, street, city, categories, suppliers, customers, purchaseOrders, salesOrders FROM model1_Company WHERE cdo_id=? AND cdo_branch=? AND (ABS(cdo_version)=?) already in cache at org.eclipse.emf.cdo.server.internal.db.SmartPreparedStatementCache$Cache.put(SmartPreparedStatementCache.java:123) Reproducible with test case. Will create bug branch to track ...
The problem was caused by the recursive reading in cascading branches. If a list is modified in a sub-branch and the list values are not yet present in that branch, the list values have to be read from the base branch's revision via a recursive call. The problem was that the caller did not release its own SQL statement to the cache before doing the recursive call. Therefore, for each recursion the same SQL statement was created new (because the cache did not contain it as it was checked out). When checking in, the cache checks if the SQL is already contained in the cache and if so issues the error encountered above. The fix was to finish all reading operations and then release the statement to the cache before doing the recursive call. Test case and fix available in commit 06caef367e263da4cc302a6307841a7e95f0e2bc Author: Stefan Winkler <stefan@winklerweb.net> 2012-01-26 13:17:38 Committer: Stefan Winkler <stefan@winklerweb.net> 2012-01-30 12:11:47 Parent: 490d2d1752af8e5e8404549a498e335040d19bb1 (Add a missing if(TRACER.isEnabled()) line) Branches: bugs/370105, origin/bugs/370105
Stefan, please contact me on Skype (having Git issues...)
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
commit cd7c758a5c0887ea43c769c4aa276a3157debe6a
See also bug 364105.
Available in R20130613-1157 (4.2)