Community
Participate
Working Groups
Build Identifier: 4.0 With the current implementation of WithIndex.adjustAfterRemoval, list indices are not correctly 'patched' when merging using the CDODefaultMerger.ManyValued merger. Normally, the XRef check on the server should prevent committing this, but when the indices for an ADD and REMOVE feature delta on the same list have the same index (wrongly patched), the deltas are optimized away and the changeSet contains the detached object from the REMOVE without the associated list change, which then leads to the stale reference on the server. Reproducible: Always Steps to Reproduce: See testcase
Created attachment 179833 [details] Testcase Testcase which will throw an ObjectNotFoundException when accessing the list after commit.
Created attachment 179834 [details] Proposed patch to fix the index problem This patch addresses the index problem. However, it might be possible to create the situation as described in the testcase in some other way, which might create the need for more stale reference checking on the server. NOTE: the ManyValued merger does not yet work correctly for larger lists, I might post an improved version when I finally find some time to clean up my code :) 1) The number of lines that you changed is smaller than 250. confirmed. 2) You are the only author of these changed lines. confirmed. 3) You apply the EPL to these changed lines. confirmed.
Created attachment 180011 [details] Combined patch - for future reference Plus AllConfigs.java
Committed to HEAD
Available in R20110608-1407