Skip to content

Conversation

@olavloite
Copy link
Collaborator

Allow enabling/disabling automatic retries of transactions after a transaction has been started, but before any statements have been executed. This allows an application to do the following:

tx, _ := db.BeginTx(ctx, nil)
_, _ = tx.ExecContext(ctx, "set retry_aborts_internally=true")
_l _ = tx.ExecContext(ctx, "insert into my_table (id, values) values (1, 'one')")

Allow enabling/disabling automatic retries of transactions after a transaction
has been started, but before any statements have been executed. This allows
an application to do the following:

```
tx, _ := db.BeginTx(ctx, nil)
_, _ = tx.ExecContext(ctx, "set retry_aborts_internally=true")
_l _ = tx.ExecContext(ctx, "insert into my_table (id, values) values (1, 'one')")
```
@olavloite olavloite requested a review from a team as a code owner July 2, 2025 16:58
@olavloite olavloite requested a review from rahul2393 July 2, 2025 16:58
rahul2393
rahul2393 previously approved these changes Jul 3, 2025
@olavloite olavloite merged commit 23b8282 into main Jul 3, 2025
20 checks passed
@olavloite olavloite deleted the allow-set-retry-mode-in-tx branch July 3, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants