Under (relatively) heavy load LRUAlgorithm for some reason tries to remove the same
node twice. Result is java.lang.RuntimeException: LRUAlgorithm.evict(): null node map
entry for fqn: /test1/node835264.
Test case. local-eviction-service.xml is used. Default region - 5000 nodes max. LRU
policy.
| public void test2() throws Exception {
| cache = new TreeCache();
| PropertyConfigurator config = new PropertyConfigurator();
| config.configure(cache, "jboss/local-eviction-service.xml");
|
cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
| cache.start();
|
| cache.put("/test1", "value", new Integer(1));
|
| for (int i = 0; i < 10; i++) {
| new Thread() {
| public void run() {
| while (true) {
| int i = (int) (Math.random() * 10000000);
| try {
| cache.put("/test1/node" + i, "value", new Integer(i));
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
| }
| }.start();
| }
|
| while (true) {
| Node node = cache.get("/test1");
| int count = node == null || node.getChildren() == null ? 0 :
node.getChildren().size();
| log.info("Nodes: " + count);
| Thread.sleep(1000);
| }
|
| }
|
|
After running, in about 10 sec there's LRUAlgorith exception.
| 12:14:41,515 INFO [PropertyConfigurator] configure(): attribute size: 19
| 12:14:41,562 INFO [TreeCache] setClusterConfig(): setting cluster properties from
xml to:
UDP(ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=228.1.2.3;mcast_port=45566;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD(down_thread=true;shun=true;up_thread=true):VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=false;up_thread=false)
| 12:14:41,624 INFO [TreeCache] setEvictionPolicyConfig(): [config: null]
| 12:14:41,843 INFO [LRUPolicy] Starting eviction policy using the provider:
org.jboss.cache.eviction.LRUPolicy
| 12:14:42,437 INFO [LRUPolicy] Starting a eviction timer with wake up interval of
(secs) 5
| 12:14:42,437 INFO [TreeCache] cache mode is local, will not create the channel
| 12:14:42,546 INFO [TestCache] Nodes: 4
| 12:14:43,577 INFO [TestCache] Nodes: 484
| 12:14:44,734 INFO [TestCache] Nodes: 889
| 12:14:45,765 INFO [TestCache] Nodes: 1399
| 12:14:46,765 INFO [TestCache] Nodes: 2415
| 12:14:47,796 INFO [TestCache] Nodes: 2920
| 12:14:48,812 INFO [TestCache] Nodes: 4115
| 12:14:49,827 INFO [TestCache] Nodes: 5146
| 12:14:50,827 INFO [TestCache] Nodes: 6396
| 12:14:51,843 INFO [TestCache] Nodes: 7799
| 12:14:52,843 INFO [TestCache] Nodes: 8787
| java.lang.RuntimeException: LRUAlgorithm.evict(): null node map entry for fqn:
/test1/node835264
| at org.jboss.cache.eviction.LRUAlgorithm.evict(LRUAlgorithm.java:314)
| at org.jboss.cache.eviction.LRUAlgorithm.prune(LRUAlgorithm.java:285)
| at org.jboss.cache.eviction.LRUAlgorithm.process(LRUAlgorithm.java:56)
| at org.jboss.cache.eviction.EvictionTimerTask.run(EvictionTimerTask.java:33)
| at java.util.TimerThread.mainLoop(Timer.java:432)
| at java.util.TimerThread.run(Timer.java:382)
| 12:14:53,859 INFO [TestCache] Nodes: 9878
| 12:14:54,859 INFO [TestCache] Nodes: 10932
|
|
Looking into detailed log shows that this node is going to be evicted twice. (see the
first and last line, /test1/node835264)
|
| 12:14:53,093 DEBUG [LRUAlgorithm] prune(): over-capacity. Evict node
/test1/node835264
| 12:14:53,093 DEBUG [TreeCache] invokeMethod(): calling method _put
| 12:14:53,093 DEBUG [TreeCache] _put(null, "/test1/node4856351", value, 4856351)
| 12:14:53,093 DEBUG [TreeCache] invokeMethod(): calling method _put
| 12:14:53,093 DEBUG [TreeCache] _put(null, "/test1/node6325913", value, 6325913)
| 12:14:53,093 DEBUG [Node] createChild: fqn=/test1/node5183986
| 12:14:53,093 DEBUG [TreeCache] invokeMethod(): calling method _put
| 12:14:53,093 DEBUG [TreeCache] _put(null, "/test1/node4979935", value, 4979935)
| 12:14:53,093 DEBUG [TreeCache] invokeMethod(): calling method _put
| 12:14:53,093 DEBUG [TreeCache] _put(null, "/test1/node8576147", value, 8576147)
| 12:14:53,093 DEBUG [Node] createChild: fqn=/test1/node7151499
| 12:14:53,093 DEBUG [LRUPolicy] nodeAdded(): fqn- /test1/node7151499
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node7151499 will use the global default region
| 12:14:53,093 DEBUG [LRUPolicy] nodeModified(): redirecting to node visited. fqn-
/test1/node7151499
| 12:14:53,093 DEBUG [LRUPolicy] nodeVisited(): fqn- /test1/node7151499
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node7151499 will use the global default region
| 12:14:53,093 DEBUG [Node] createChild: fqn=/test1/node1241366
| 12:14:53,093 DEBUG [LRUPolicy] nodeAdded(): fqn- /test1/node1241366
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node1241366 will use the global default region
| 12:14:53,093 DEBUG [LRUPolicy] nodeModified(): redirecting to node visited. fqn-
/test1/node1241366
| 12:14:53,093 DEBUG [LRUPolicy] nodeVisited(): fqn- /test1/node1241366
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node1241366 will use the global default region
| 12:14:53,093 DEBUG [Node] createChild: fqn=/test1/node9401565
| 12:14:53,093 DEBUG [LRUPolicy] nodeAdded(): fqn- /test1/node9401565
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node9401565 will use the global default region
| 12:14:53,093 DEBUG [LRUPolicy] nodeModified(): redirecting to node visited. fqn-
/test1/node9401565
| 12:14:53,093 DEBUG [LRUPolicy] nodeVisited(): fqn- /test1/node9401565
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node9401565 will use the global default region
| 12:14:53,093 DEBUG [TreeCache] invokeMethod(): calling method _put
| 12:14:53,093 DEBUG [TreeCache] _put(null, "/test1/node4180297", value, 4180297)
| 12:14:53,093 DEBUG [TreeCache] invokeMethod(): calling method _put
| 12:14:53,093 DEBUG [TreeCache] _put(null, "/test1/node4740050", value, 4740050)
| 12:14:53,093 DEBUG [LRUPolicy] nodeAdded(): fqn- /test1/node5183986
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node5183986 will use the global default region
| 12:14:53,093 DEBUG [LRUPolicy] nodeModified(): redirecting to node visited. fqn-
/test1/node5183986
| 12:14:53,093 DEBUG [LRUPolicy] nodeVisited(): fqn- /test1/node5183986
| 12:14:53,093 DEBUG [RegionManager] getRegion(): not user-specified region found
for this fqn- /test1/node5183986 will use the global default region
| 12:14:53,093 DEBUG [TreeCache] _remove(null, "/test1/node835264")
| 12:14:53,093 DEBUG [LRUAlgorithm] prune(): over-capacity. Evict node
/test1/node835264
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845882#3845882
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845882
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development