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?

gefragt vor 2 Jahren169 Aufrufe
1 Antwort
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
beantwortet vor 2 Jahren
  • 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

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen