kvcoord: eliminate potential ambiguous errors by querying intents in distsender #108342
Labels
A-kv-transactions
Relating to MVCC and the transactional model.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv
KV Team
As described in #103817, when RPC failures occur on KV write operations parallel to a commit operation, retries of the operations cannot necessarily be considered idempotent. While #107658 introduced proper handling of these cases to raise
AmbiguousResultErrors
when necessary, it should be possible to improve handling in some cases with a longer-term solution.While we cannot avoid all cases that would require us to propagate an AmbiguousResultError on a transaction that encounters an ambiguous error in a batch with a commit, we should be able to narrow down the cases in which we have to do so. To do this, we need to add handling in the DistSender to query intents for writes that had ambiguous errors and/or to attempt recovering the transaction entirely. In recovering the transaction, we would need to use a modified form of RecoverTxn that only explicitly commits or leaves the transaction state unaltered (if writes cannot be verified), rather than causing an abort.
Jira issue: CRDB-30432
The text was updated successfully, but these errors were encountered: