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 年前檢視次數 322 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南