Optimistic concurrency control guarantees
Do I understand correctly that https://docs.convex.dev/database/advanced/occ works by checking the "index query document sets" before writes, not just the docs that literally have been read? That is, all indexes (or whole table scans) that would have returned different results if mutation restarted again that have been performed within the mutation are re-checked (metaphorically) before the transaction is committed?
As far as I can see this isn't spelled out clearly in the docs anywhere (only the prototypical yet simplistic financial transaction example is used, in which only the literal returned doc's change is at play, not index query), yet this information is critical for clear understanding of OCC in Convex.
OCC and Atomicity | Convex Developer Hub
Optimistic concurrency control and transaction atomicity in Convex
1 Reply
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!