kvclient: require explicit acknowledgement from client on restart #85980
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv
KV Team
Is your feature request related to a problem? Please describe.
Today, when a transaction hits some restart errors, it increments its epoch and remains open. When that happens a
TransactionRetryWithProtoRefreshError
makes its way to the client. In various situations we've seen sql code failing to properly propagate the error and update its state machine accordingly (#85677, #84448). In those cases, the transaction in question will silently lose the writes preceding the restart. We've seen other cases where the transaction is aborted internally and needs to be restarted, but methods continue to work.Describe the solution you'd like
A transaction which has been restarted internally should require an explicit acknowledgement from the client before it becomes usable again. An aborted transaction should return more errors from various methods to prevent misuse.
Jira issue: CRDB-18513
The text was updated successfully, but these errors were encountered: