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?

gefragt vor 2 Jahren322 Aufrufe
1 Antwort
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?

beantwortet vor 2 Jahren

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