Issue
I am new to Aerospike db and hoping to try transactional.
We have an api which update TableA and TableB in a single request. Now, How can I make my request Transactional where atomicity is achieved?
#########################
Solution
Aerospike doesn't support multi record transactions natively yet.
There is a non-official way to achieve multi record transactions:
https://aerospike.com/blog/multi-record-transactions-for-aerospike/
https://github.com/aerospike-examples/atomicMultiRecordTxn
But it has flaws (https://github.com/aerospike-examples/atomicMultiRecordTxn#caveats) and it's not supported in Spring Data Aerospike - you added a spring-boot tag so I assume you are using Spring Data Aerospike.
An alternative approach could involve modeling your data differently, potentially eliminating the need for multi-record transactions. Aerospike supports a rich data model which includes Maps and Lists, check out: https://docs.aerospike.com/server/guide/data-types/overview
Answered By - Roi Menashe
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.