Running the attached project locally I'm unable to reproduce the problem that you're reporting - i.e. the test runs fine.
Also, you're not using a *real* transaction manager, meaning Infinispan will default to the DummyTransactionManager. The ISPN docs state the following:
DummyTransactionManagerLookup : This provides with a dummy transaction manager which should only be used for testing. Being a dummy, this is not recommended for production use a it has some severe limitations to do with concurrent transactions and recovery.
So I would try a couple of things:
- update your POM to use narayana-jta (it's defined in the ModeShape BOM)
- if after the above change your test still fails, try using the latest build from the 3.x branch (which will de facto be 3.8.1)
Thanks for having a look, Horia!
I notice the issue in our production enviroment where the code in the Runnable is modeled as an EJB with CMT. So the issue also occurs using a "real" transaction manager. Nevertheless I switched to narayana-jta but the issue still occurs (4946/5000).
Did you try running the latest 3.x code ? Also, did you try without registering ISPN as a synchronization (i.e without useSynchronization="true") ?
Same without synchronization. But I needed to increase the doc count to 10000 to reproduce the issue.
I've not tried the 3.x branch yet. I'll check that later.
If the issue is still there with the latest 3.x, I suspect it may be another similar ISPN bug as MODE-2280. If that is the case, you could try writing a much simple test case using only the ISPN cache (and gets/puts like in modeshape/SchematicDbConcurrentTest.java at master · ModeShape/modeshape · GitHub) and then report the issue on the Infinispan JIRA. If you're unable to reproduce the issue using only Infinispan, then this may be a ModeShape bug.
BTW, what OS is this happening on ? (MODE-2280 seems to only be happening on Windows)
- Same issue with 3.x branch.
- Issue is not depending on OS (Windows and Linux)
With the test case applied, can you try to increase the file node count to 10.000? You should face the issue aswell.
Running with 10.000 failed at the end, but only after 1h:30 minutes of running on my machine, which is totally impractical for any sort of investigation. Did you try running with other cache stores ?
Again, for any chance of actually investigating this, a test case which fails a lot sooner is required (also, as mentioned above I would try writing a test case directly against Infinispan, since I doubt this is ModeShape related).
If it helps, you can look at the ISPN test case I created for [ISPN-4810] Local Transactional Cache looses data when eviction is enabled and there are multiple readers and one writer… (should be really easy to adapt to your case & ISPN 5)