Reputation: 1118
I am using infinispan 7.2.5 version to make in memory cache. to access that cache I am using Hotrod. So I have hotrod server running on cluster mode and that multiple client who can access server using hotrod client.
I am doing a putAll operation to put data into cache. now I have a requirement where we want to put everything or nothing in cache so what I mean here either putAll should be able to put all the data into cache or if it fail nothing should be added into cache. I was going through the documentation of the infinispan to check if putAll is atomic but as per the documentation it is not.
So my question is :
I was also thinking to make transactionMode cache but not sure if it solve my problem without impacting much on performance?
Any suggestion here will be appreciated.
Upvotes: 0
Views: 176
Reputation: 5888
Infinispan does not support transactions over Hot Rod(*), and putAll is not atomic. It is not atomic in non-transactional embedded mode either.
The best workaround would be running with transactions, and starting the transaction manually from script execution.
(*) Server-side support is already in but the client-side has not been implemented yet. Client implementation is on the roadmap for 9.3 or 9.4 (subject to change).
Upvotes: 1