Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311840

Summary: OutOfMemory with fast population of revision cache
Product: [Modeling] EMF Reporter: Victor Roldan Betancort <vroldanbet>
Component: cdo.coreAssignee: Victor Roldan Betancort <vroldanbet>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: major    
Priority: P2 CC: stepper
Version: 3.0Flags: stepper: review+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch v1
none
patch v2 - ready to be committed none

Description Victor Roldan Betancort CLA 2010-05-06 05:30:07 EDT
CDO Client has some cache structures to accelerate CDORevision fetching process, avoiding round-trip with the server. This has a great impact in the performance of client application.

If using revision cache with STRONG or WEAK references, unreferenced revisions should be evicted, but it appears that when we are managing millions of objects, either fetching from server or by making really fast commits or bit commits, the cache seems to grow too fast and revisions don't get evicted with enough frequency.
Comment 1 Victor Roldan Betancort CLA 2010-05-06 05:34:50 EDT
The problem could be easily solved by changing the way ReferenceQueueWorker polls ReferenceQueue for evicted references. Eike and I agreed to make DEFAULT_MAX_WORK_PER_POLL to -1, which would imply undefinitely poll the queue, instead of the current value, 100.
Comment 2 Victor Roldan Betancort CLA 2010-05-06 07:22:16 EDT
Created attachment 167284 [details]
patch v1

poll set to infinite by default
Comment 3 Eike Stepper CLA 2010-05-06 09:07:45 EDT
Created attachment 167297 [details]
patch v2 - ready to be committed
Comment 4 Victor Roldan Betancort CLA 2010-05-06 09:16:50 EDT
Committed to HEAD
Comment 5 Eike Stepper CLA 2010-06-29 04:35:40 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/