| Summary: | IndexOutOfBoundsException upon invalidation | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Victor Roldan Betancort <vroldanbet> |
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> |
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cyril.jaquier, erwin, michael, pascal.lehmann |
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | offline-11 | ||
| Bug Depends on: | 310574 | ||
| Bug Blocks: | |||
| Attachments: | |||
|
Description
Victor Roldan Betancort
This also happens for other CDOFeatureDeltas (eg. ADD). The problem is that when the invalidation removes remote_detached objects from your dirty transaction, indexes for the RevisionDeltas are not adjusted. Created attachment 165282 [details]
TestCase
forget my last comment, I was confusing the error with another problem with invalidation and collisions. But I attached a testcase for your problem. Created attachment 167345 [details]
Patch Proposal for the Notification Builder
Hi Pascal and Michael, Thanks for the test case and the patch! Can you (both) please confirm the following: 1) The number of lines that you added/changed is smaller than 250. 2) You are the only author of these changed lines. 3) You apply the EPL to these changed lines. Committed to HEAD 1) The number of lines that you added/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 1) The number of lines that you added/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 The originally attached patch does fix the IndexOutOfBounds problem, but introduces other problems later in the notification chain because of the patched indices (eg. DataBinding). Here is a new patch which does not tamper with the indices of the notification itself, but uses patched indices internally to retrieve the values for the old objects. Other changes introduced: - NPE should be fixed: bug #313326 - Lookup for old Object is always done in the view first, before looking in the detached list. - OldValue is now always CDOID or the old Object, was sometimes null before. The last change lead to occasional ObjectNotFoundException while accessing the oldValue of the Notification, therefore I introduced also a patch for CDODeltaNotificationImpl. Created attachment 170330 [details]
better patch for CDONotificationBuilder
Created attachment 170332 [details]
CDODeltaNotification patch proposal
1) The number of lines that you added/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
please reopen. Reopened Created attachment 170958 [details] Updated TestCase I added another test which still fails, even with the newer patch. The new problem is that the CDONotificationBuilder tries to get the detached object which was attached in the same commit (and therefore is in the same RevisionDelta). This of course can not work as the old revision only knows the values attached anytime before the last commit. I'm unsure if this should be fixed with bug #310574 or if this should be handled here as well. I disabled _testBugzilla_306710_addRemove() for now. After fixing bug 310574 this must be revisited!!! Committed to HEAD. Created attachment 171709 [details] Enable and fix the second test in the TestCase after the fix for bug 310574 This patch enables again and fixes testBugzilla_306710_addRemove after the fix for bug 310574. Thank you Cyril! Available in 3.0 GA: http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/ |