Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 292375 - CDO Server does not honor config settings for currentLRUCapacity and revisedLRUCapacity
Summary: CDO Server does not honor config settings for currentLRUCapacity and revisedL...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 2.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: 2009-10-15 06:43 EDT by Caspar D. CLA
Modified: 2010-06-29 09:21 EDT (History)
2 users (show)

See Also:
stepper: review+


Attachments
Patch for 2.0.0 (2.49 KB, patch)
2009-10-15 06:54 EDT, Caspar D. CLA
stepper: iplog+
Details | Diff
Patch for 2.0 [incremental] (1.75 KB, patch)
2009-11-25 05:45 EST, Caspar D. CLA
no flags Details | Diff
Patch - ready to be committed (2.01 KB, patch)
2009-12-25 13:50 EST, Eike Stepper 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 2009-10-15 06:43:54 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Firefox/3.0.1
Build Identifier: CDO 2.0.0.v200906160459

The bug description says it all. Whatever values are specified in cdo-server.xml, the LRURevisionCache is always configured with the defaults values of (1000, 1000).

I'll attach a patch in a minute.

Reproducible: Always
Comment 1 Caspar D. CLA 2009-10-15 06:54:27 EDT
Created attachment 149627 [details]
Patch for 2.0.0
Comment 2 Eike Stepper CLA 2009-11-05 08:10:11 EST
Good catch! I only changed the way the properties are set. This only happens if an LRUCache is used at all.

In general I'm not very satisfied with the way repos are setup at all. Maybe opening up all internal code will do the trick in the future. Then we can avoid all these awful static create() methods and make configuration more straight forward...

Committed to R2_0_maintenance
Comment 3 Eike Stepper CLA 2009-11-05 08:11:59 EST
Comment on attachment 149627 [details]
Patch for 2.0.0

Jasper, please confirm that:

1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
Comment 4 Caspar D. CLA 2009-11-06 00:19:18 EST
(In reply to comment #3)
> (From update of attachment 149627 [details])
> Jasper, please confirm that:
> 
> 1) The number of lines that you changed is smaller than 250.
> 2) You are the only author of these changed lines.
> 3) You apply the EPL to these changed lines.

I confirm.
Comment 5 Caspar D. CLA 2009-11-25 04:36:15 EST
Reopening because LRU settings are still ignored if the LRUCache is contained 
inside a TwoLevelCache. They are only applied if the top-level cache is an LRUCache.

By the way, the patch that I provided on Oct 15 didn't suffer from this shortcoming. What was committed to R2_0_maintenance was significantly different from the patch - and broke it.
Comment 6 Caspar D. CLA 2009-11-25 05:45:11 EST
Created attachment 153050 [details]
Patch for 2.0 [incremental]

Patch is in the spirit of what was committed, but inspects a TwoLevelCache's L1 and L2 to see if they are instances of LRURevisionCache.

This is incremental; applies to R2_0_maintenance as of today.
Comment 7 Eike Stepper CLA 2009-12-25 13:50:02 EST
Created attachment 155041 [details]
Patch - ready to be committed

I made it recursive to handle nested TwoLevelCaches.
Comment 8 Caspar D. CLA 2009-12-28 05:20:20 EST
Committed to R2_0_maintenance