Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are dynamodb update expressions strongly consistent?

Suppose that a given table already contains the following key value pair:

{ "id": "one", "num": 5000 }

If I write an update expression such as "ADD num :val" to add values as necessary can I expect this to be consistent in case of parallel requests?

like image 572
codejammer Avatar asked Nov 07 '22 10:11

codejammer


1 Answers

It seems you're guaranteed that the result is consistent, i.e. if the current value is 10 and you add 2 and in another request 3 you will get 15.

I've asked a similar question regarding adding values to a set. An AWS employee answered that the result will be consistent. See https://forums.aws.amazon.com/thread.jspa?messageID=919205

Unfortunately this behavior is not a clearly documented at all.

like image 65
Markus Kramer Avatar answered Dec 10 '22 03:12

Markus Kramer