[jboss-user] [JBossCache] - Re: What is the relation between in-memory nodes and nodes i

manik.surtani@jboss.com do-not-reply at jboss.com
Mon Sep 17 09:01:48 EDT 2007


"sg283" wrote : Please confirm if I understand this correctly:-
  | 1- Suppose I have defined maxNodes in region X to be 4500, and my application tries to put 1000 more nodes in region X then there would be 5500 nodes in total; 4500 in region X and 1000 nodes in region _default_.  All 4500 nodes in region X would be evicted as per eviction defined in region X and all 1000 nodes in region _default_  would be evicted by the eviction time defined in region _default_.
  | 

This is wrong.

A region is just a subtree.  So if you have a region defined as /a/b/c, anything you put under /a/b/c is counted towards the number of nodes in the region (e.g., /a/b/c/d or /a/b/c/e or even /a/b/c/d/e/f/g).

If you have > MaxNodes nodes in the region, they will still exist in the DB, just not in memory.

Your ideas around eviction are all wrong as well.  Only nodes exceeding MaxNodes are evicted.  

"sg283" wrote : 
  | 2- If I have tree cache nodes a,b, and c , a being the root node and c being the leaf node and b being the intemediate node, suppose for some reason, node a and c are in region X and node b is in region _default_. 
  | Eviction time in region X is 10 minutes and in  _default_ is 5 minutes.
  | If node b expires after 5 minutes, what would happen to node c? Would node c be lost?
  | 

No - eviction only REMOVES a node if it doesn't have any children.  If a node has children it just empties all the data in the node, marks it as uninitialized, but keeps the node as it has a structural role to play.



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

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



More information about the jboss-user mailing list