[jboss-user] [JBoss Cache: Core Edition] - ExpirationPolicy & ClusteredCacheLoader

lovelyliatroim do-not-reply at jboss.com
Tue Feb 3 08:26:23 EST 2009

Hi Guys,
   Im am using the clustered cache loader and in one of my regions i use the ExpirationPolicy.

Im noticing something strange when i started playing with it, the eviction policy does not seem to work for data that is gravitated from a different node.

Lets say i have a region configured called "a/b" with a max set of a 1000.

Now when i add to the cache i place a path with values like so "a/b/c/d/e", now e is the node that i place the data item and also place the expiration time. When you do this you see the algorithm complains and you see logs like so

  | 14:03:51,921 [EvictionTimer-1] WARN  eviction.ExpirationAlgorithm  - Unable to remove nodes to reduce region size below 10000.  Set expiration for nodes in this region

Thats because I assume the nodes c and d dont have the expiration policy value set. (Thats fine).

Now when I start 2 nodes, i ask node1 for "a/b/c/d/e", it doesnt have it so retrieves from the data source, i then add it to the cache in node1. I then start to see the above logs which is fine.

Now i ask for the same data item from node2, the data is gravitated over via the clusteredcache loader and i return the value. Now i dont see any logs like above that tells me the eviction policy is started on node2 for that region. When the time has elapsed for the data item to be expired, it will expire on node1 but it does not expire on node2. When i add a different data item to the same region in node2 lets say "a/b/c/d/e2", i start seeing the logs, after the expiration time "e2" gets evicted but "e" still exists. 

Havent looked under the bonnet yet but it looks to me that data that is gravitated over via the clustered cache loader is not getting registered with the ExpirationPolicy algorithm, it simply thinks there is no data in this region to evict hence it doesnt start and when there is other data items in the region, it will evict them but the gravitated data item is still not getting cleaned up!!

Using the 2.2GA version.

Any insight?? 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206546#4206546

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206546

More information about the jboss-user mailing list