I'm using Jackrabbit Oak 1.6.1 in a cluster config (by using default configurations). There is one mongodb server which contains one Oak DB. Two instances of Oak are running into Intellij, so I can debug each of them. Each Oak instance records itself in the clusterNodes collection, everything works well.
But I have interactions with other external services (file converter, eventbus, etc.) so I fall on cases which reveals that the two Oak instances doesn't see the same datas at the same time (the cluster is not consistent).
The scenario :
- Add a node into a folder on Oak1 (with a binary sub node)
- Oak 1 records the node, the binary node and commit with session.save()
- Oak 1 send the binary file to the file converter service
- When the conversion is finished, the converter service call Oak 2 with the converted binary (to add to the parent node)
- Oak 2 try to get the node created by Oak 1 some milliseconds before
- Oak 2 throws a ItemNotFoundException
Just for test, I made Oak 2 waiting until the node appear. And the node become visible around 500 to 1000 ms after it was created by Oak 1.
Does anybody use Oak in cluster mode ? Has anybody saw this type of problem ?
Thanks