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?

demandé il y a 2 ans169 vues
1 réponse
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
répondu il y a 2 ans
  • 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

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions