[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-1288) Handling of default eviction region config leads to duplicates

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Thu Feb 7 18:23:03 EST 2008


     [ http://jira.jboss.com/jira/browse/JBCACHE-1288?page=all ]

Brian Stansberry updated JBCACHE-1288:
--------------------------------------

    Fix Version/s: 2.1.0.GA
                       (was: 2.1.0.CR4)

Moving this out to 2.1.0.GA.  There is a basic fix in place for 2.1.0.CR4 that solves the core problem and doesn't cause any testsuite regressions.  There's also what seems IMHO to be a somewhat better fix commented out in RegionManager.setEvictionConfig().  That one causes some test failures; a comment in the method explains the issue.  I think the tests that have problems are really not using the cache correctly (not configuring a default region or a default policy); just need to be tweaked.  But, for now I want to keep it simple and not introduce code that enforces a requirement for a default region or a default policy.  Can revisit for the GA.

> Handling of default eviction region config leads to duplicates
> --------------------------------------------------------------
>
>                 Key: JBCACHE-1288
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1288
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Eviction
>    Affects Versions: 2.1.0.CR3
>            Reporter: Brian Stansberry
>         Assigned To: Brian Stansberry
>             Fix For: 2.1.0.GA
>
>
> The way the EvictionConfig.getEvictionRegionConfigs() method works leads to duplicate entries for the _default_ region when the JBoss Microcontainer builds  up a configuration.
> Problem is when there is no list of ERCs, the method builds one with a config for the _default_ region in it, and returns that.  The MC will call this method, and then try to add xml-configured ERCs to the returned list.  If a _default_ region is configured in XML, the _default_ region will end up being in the resulting list twice.
> Test org.jboss.cache.config.EvictionRegionConfigurationTest.testDuplicateDefaultRegion() shows the issue.
> I think the core problem here is that the attempt to add a default region is being done in the wrong place. It's not really the concern of the EvictionConfig class.  I think it properly belongs in RegionManager.setEvictionConfig() -- that's the class that's responsible for checking the configuration and making it conform to its requirements.
> I've got a patch along the above lines.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list