DynamoDB False save

0

I just experienced disturbing behavior and I wonder if anyone else saw anything similar and how to handle it?

I'm updating a row in DynamoDb from node.js lambda and logging ALL_NEW result of the update operation.
In my log, I can see the data I was trying to save but in the table itself, that data is missing. On the next run, everything went OK.

This is very problematic from a data consistency perspective.

Anyone has an idea where to look and if there is some setting or way to handle this kind of behavior?

  • Are you doing a strongly consistent or eventually consistent read to check if the data is there?

asked 2 years ago165 views
1 Answer
0

Hello,

What you're seeing is the effect of an "eventually consistent read", please take a look at this doc page that describes the differences between the "eventually consistent" and "strongly consistent" reads: ttps://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html

The default read mode is eventually consistent, and you have to request the strongly consistent read if you need it, using the "ConsistentRead" parameter.

Regards

AWS
answered 2 years ago
  • Eventual consistency will become consistent within 1 second or less. In OPs case he had time check his logs, so it seems more than a second

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions