I am using FineGrainedAtomicMap to store data into clustering distributed cache. When clustering set to replicated doesn't cause any issues or at least I haven't run
into any. When I switch to distributed mode I don't see some key,value pairs in some nodes. This happens randomly. The numOwners is set to two and I have cluster of three nodes.
Details about cluster:
1. Infinispan 5.1.5
2. java 7u5 64bit
3. linux 64bit (two nodes debian and one node ubuntu)
4. tomcat 7.0.28
5. jbossTM 4.16.0 JTA only
Tomcat integration code is here:
6. all machines are on real hw ( no virtual machines), date and time is synchronized and shouldn't vary more than 1 second
I am sure all nodes have same configuration( I use git repository to keep all machines in sync ).
Config files and log files of all machines are attached with infinispan trace log level enabled. I have started tomcat and reproduced the issue a few times than I killed the processes.
Do I have wrong configuration? I read the attached ispn trace logs, only strange message I found was that the L1 cache is enabled
even when I have disabled L1 cache in config file.
Should I use only replication cache mode when using FGAM?
I saw that unit tests in ispn are only in REPL mode.
All my code is here:
I have created unit tests and I was able to reproduce same issue there too.
I found simmilar error reported, but I use JBoss transaction manager and that issue was fixed.
More about the application:
https://github.com/zvrablik/tomcatInfinispanSessionManager/tree/master/tomcatDistributedSessionManager is distributed session manager for Tomcat 7.
I would like to use sticky session mode than I don't need cache replication. There is created one cache manager per web application and one cache
for session data and metadata. Data and metadata are separated. There is one cache item for data (session attributes) and one session item for metadata
(session creation time etc. )
Thanks for any hint how to fix this.
ispnTestLogfiles.tar.gz 538.4 K
Thanks for the detailed description Zdenek.
What is the infinispan configuration you use? Are you using async replication? If so the changes might not be made visible straight away and the test you wrote might indeed fail.
And one more clarification: an AM is composed from AM's key in the cache and a set of (k,v) pairs that are added to it. My understanding is that the loss of data you noticed refers to the later, i.e. some k,v pairs from the AM are missing.
I use sync replication and it works fine. Problem with FGAM happens when I use sync distributed mode with 3 cluster nodes and numOwner=2. Full configuration is in attached in ispnTestLogfiles.tar.gz
I have changed my implementation not to use FGAM but the AtomicMap and it works fine when using sync distributed mode with 3 cluster nodes and numOwner=2.
Currently I think I have two options use replication or AtomicMap. Best would be using FGAM for my use case. The map represent tomcat session data and metadata.
Thank you both Vladimir and Markus.
I mark the question answered now as I think I can't use FGAM in distributed mode.