Dynamoid icon indicating copy to clipboard operation
Dynamoid copied to clipboard

Making multiple table update atomic

Open hlms opened this issue 10 years ago • 3 comments

I need to update multiple tables through dynamoid. Is there any way to make such transaction atomic?

For example, for a particular operation, I'm updating tables t1, t2, t3. If update in t1, t2 succeeds but if it fails for t3, it should revert the update in t1 and t2? Any way to do this in dynamoid?

hlms avatar Jan 20 '15 08:01 hlms

No. You'd need to use another framework to do transactions or implement them yourself. Transactions are also really inefficient in Dynamo, you probably don't want to use them unless you really need to.

ngordon17 avatar Mar 20 '15 06:03 ngordon17

Can someone name any framework which can be helpful in this case? Does AWS SDK v2 provide transaction facility?

hlms avatar Mar 21 '15 13:03 hlms

There's one provided byAWS for Java, but to my knowledge none for Ruby. You'd have to create your own.

ngordon17 avatar Mar 21 '15 20:03 ngordon17