Concurrent DynamoDB TransactWriteItems requests with same ConditionCheck

1

I have N concurrent TransactWriteItems requests each with a single Put (N distinct keys), but they all have the same (unrelated to this set of N keys) key for a ConditionCheck. I get intermittent failures (like a classic race) with reason TransactionConflict. If I remove the conditional check on that single key, then it is fine. The actual key itself does not matter, just that I have that ConditionCheck on a single key.

The key is not getting throttled (checked using CloudWatch Contributor Insights) and I would expect a different reason anyways?

I am sure that single key in the ConditionCheck is not being modified during the transactions.

Am I just missing something very obvious here?

질문됨 2년 전305회 조회
1개 답변
0

Not sure sure if this is actually an answer, but by reading https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html#transaction-conflict-handling again, a conflict can occur when An item within a TransactWriteItems request is part of another ongoing TransactWriteItems request.

I assumed this was only applicable for things mutated by the Transaction, not merely accessed. Does anyone know if this is the case?

답변함 2년 전

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

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

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

관련 콘텐츠