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?

질문됨 2년 전169회 조회
1개 답변
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
답변함 2년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인