[jbosscache-issues] [JBoss JIRA] Created: (JBCACHE-1515) Evicition Algorithms Can Fail In Overflow Situations
Jimmy Wilson (JIRA)
jira-events at lists.jboss.org
Sun Jun 21 23:36:56 EDT 2009
Evicition Algorithms Can Fail In Overflow Situations
----------------------------------------------------
Key: JBCACHE-1515
URL: https://jira.jboss.org/jira/browse/JBCACHE-1515
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Eviction
Affects Versions: 1.4.1.SP13
Reporter: Jimmy Wilson
Assignee: Jimmy Wilson
Fix For: 1.4.X
The configuration for LRU time-to-live (TTL) takes a value in seconds, and casts it as an int. This value is then manipulated dynamically to determine if a cache entry should be evicted. The problem with the LRUAlgorithm (line 50) is that it multiplies the int value by 1000 and compares it to another long (neither the TTL nor the conversion factor are cast to long). If the configured TTL is more than 2,147,484 (1/1000 of Integer.MAX_VALUE), the result of the multiplication will be a negative number and eviction will always be triggered immediately. This problem can be corrected by changing the multiplier from "1000" to "1000L".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosscache-issues
mailing list