I've been experimenting on infinispan tree for a while,
replication is performed as expected in infinspan tree,
but the invalidation is not working as expected (atleast in my use-cacse).
My use cache:
Creating treeCache and adding child elements(fixed nodes) before performing any operation (like addChild, put and get..).
// creating trrecache
Cache mapCache= cacheManager.getCache(cacheName);
TreeCache treeCache = new TreeCacheFactory().createTreeCache(mapCache);
// adding childs
nodePath = Fqn.fromElements("a", "b"); - /a/b
Node<K, V> rootNode = ispnTreeCache.getRoot(); - /
node = rootNode.addChild(nodePath); - /a/b
After this I want to perform all the operation on node "b".
using above code in 2 node cluster, invalidation not performed as expected :
- started node1 : created cache and added child "/a/b"
- starting node2: creating the cache and sending invalidation to node1. Finally rootNode '/' alone left in Node2 all childNodes('/a/b') got invalidated.
My Question is :
- Any modification leaf node level, it is sending invalidation for parent of that leafNode.(for ex: modification on leaf node "/b" invalidating its parent node "/a")
finally only "/" is left. but in case of jboscache it working fine.
is it correct behavior? or am i doing anything wrong here?
Could be a bug. Would you mind creating a test case using one of our maven archetypes? See "Writing a test case for Infinispan" section in https://docs.jboss.org/author/display/ISPN/Infinispan+Maven+Archetypes
I',m curious. Is this issue resolved? Did the issue ever find its way into JIRA? If so, could you please provide a link.
I'm also experiencing problems with the following combo: Infinispan (5.1.6 Final) plus TreeCache plus invalidation.
The problem starts with creating the root node (which is implictly done by the construcor of TreeCacheImpl). The creation of the root node seems to always propagate invalidation messages throughout the cluster. That means, if there's already one node active and the cache instance of that node already is populated, its entire cache gets invalidate as soon as another node joins the cluster.
The original behavior with JBossCache was different.
Thanks for any hints,