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?

asked 2 years ago287 views
1 Answer
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?

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions