My application is multithreaded and i have multiple instances of application running, which is triggering getAll on the same cache for different set of keys using transactions.
The Apache Ignite is throwing "Transaction already started by current thread IGNITE_ERR_TX_THIS_THREAD = 2027." Error.
My app does the following.
- Inserts the message
- Check if it received all the messages (since other instances are also inserting) checking the ContainsKey(KeySets)
- if so, creates a transaction, gets all the messages (getAll) and stores in the application data structure for further processing and removes all from the cache and commits the transatction. This is needed because only 1 instance of application should get all the messages. or else, it gets the duplicates. Also have a retry mechanism if there is any transaction errors.
Since the step 3 is happening frequently for different set of keys on the same cache, I think the Ignite is throwing IGNITE_ERR_TX_THIS_THREAD error. Is there a better approach to handling this error ?
I tried increasing the StripedPoolSize but still getting the same error.
Wow! There are so many items to discuss here.