]
Manik Surtani updated ISPN-76:
------------------------------
Fix Version/s: 4.0.0.ALPHA3
(was: 4.0.0.BETA1)
BDBJE - Improve scaling/performance of expiration purging
---------------------------------------------------------
Key: ISPN-76
URL:
https://jira.jboss.org/jira/browse/ISPN-76
Project: Infinispan
Issue Type: Task
Components: Loaders and Stores
Reporter: Elias Ross
Assignee: Adrian Cole
Fix For: 4.0.0.ALPHA3, 4.0.0.GA
(This problem may apply to other cache storage solutions as well.)
The expiration purge code iterates and loads the entire database to find expired entries,
which is highly inefficient.
protected void purgeInternal() throws CacheLoaderException {
try {
Iterator<Map.Entry<Object, InternalCacheEntry>> i =
cacheMap.entrySet().iterator();
while (i.hasNext()) {
if (i.next().getValue().isExpired())
i.remove();
}
Should maintain a separate time -> key association. BDB-JE has a
"StoredSortedMap", so this should be straightforward to use. (See how JDBM
handles eviction.)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: