Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339313 - Revision may contain CDOList with uninitialized values
Summary: Revision may contain CDOList with uninitialized values
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 00:34 EST by Caspar D. CLA
Modified: 2011-06-23 03:36 EDT (History)
1 user (show)

See Also:
stepper: review+


Attachments
Stacktrace (1.30 KB, text/plain)
2011-03-09 00:34 EST, Caspar D. CLA
no flags Details
Testcase (as a patch) (2.43 KB, patch)
2011-03-22 01:44 EDT, Caspar D. CLA
no flags Details | Diff
Patch (3.91 KB, patch)
2011-03-22 02:00 EDT, Caspar D. CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caspar D. CLA 2011-03-09 00:34:34 EST
Created attachment 190727 [details]
Stacktrace

Consider the attached stacktrace which was dumped by a CDOServer running
with a DB store.

Apparently its possible somehow, under certain circumstances, for a
CDOList to remain uninitialized, i.e. for it to contain instances of 
CDORevisionUtil.Uninitialized

Further observations:

- Clearing the server revision cache solves the problem.

- Before the problem occurred, a client had been killed. (It's not
certain whether this has any bearing on the problem or not.)

- The UNINITIALIZED value is only added to CDOList in 2 locations:
  1. CDOListImpl.CDOListImpl (the constructor)
  2. AbstractHorizontalClassMapping.readValuesFromStatement
Comment 1 Caspar D. CLA 2011-03-21 05:26:22 EDT
From a code review, it seems to me that one way this could happen
is for prefetching to be combined with chunking. When chunking is
used, some of the elements in an isMany reference will remain set
to 'CDORevisionUtil.Uninitialized', but the code in 
LoadRevisionsIndication.prefetchRevision seems to assume that all
elements in such a collection can be cast to CDOID.

But then, I've never used chunking and/or prefetching, so I'm not
too sure I'm right about this. Any comments would be welcome...
Comment 2 Caspar D. CLA 2011-03-22 01:44:08 EDT
Created attachment 191656 [details]
Testcase (as a patch)

Test fails for DB repo configs.
Comment 3 Caspar D. CLA 2011-03-22 02:00:26 EDT
Created attachment 191657 [details]
Patch
Comment 4 Eike Stepper CLA 2011-03-22 14:08:08 EDT
Looks good to me.
Comment 5 Caspar D. CLA 2011-03-22 22:50:15 EDT
Committed revision 7576.
Comment 6 Eike Stepper CLA 2011-06-23 03:36:49 EDT
Available in R20110608-1407