[jboss-jira] [JBoss JIRA] Resolved: (JBCACHE-1051) Update of expiry time does not work correctly due to Comparable/equals inconsistency in TreeSet

Elias Ross (JIRA) jira-events at lists.jboss.org
Wed May 9 04:12:52 EDT 2007


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

Elias Ross resolved JBCACHE-1051.
---------------------------------

    Fix Version/s: 2.0.0.CR2
       Resolution: Done

Now, I double-check expiration value before doing evict.

The only downside is that if expiration times are frequently updated far in the future, a lot of memory will be required.

One potential improvement would be to periodically iterate through the eviction list and remove duplicate FQNs. Very long expiration times don't seem too common of a use case, however.

> Update of expiry time does not work correctly due to Comparable/equals inconsistency in TreeSet
> -----------------------------------------------------------------------------------------------
>
>                 Key: JBCACHE-1051
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1051
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.0.0.CR1
>            Reporter: Elias Ross
>         Assigned To: Elias Ross
>             Fix For: 2.0.0.CR2
>
>
> Expiry times that change do not override the existing expiry time of an FQN.
> This is because the update in the TreeSet is being done by adding a new entry with the same FQN but different expiry time.
> Although this would work in the case of a HashSet, this fails with an ordered set which relies on the ordering of entries to navigate and update entries in the set.

-- 
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