Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.2.x] c/tx_gateway: made end_txn fully idempotent when committing transaction #22941

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #22937

When transaction is committed the process may be interrupted in any of
the steps i.e. before replicating the `preparing_commit` state update,
before requesting data partitions to commit transaction or before
replicating `completed_commit` state update. When an `end_txn` request
is retried by the client `tx_gateway` try to progress the transaction
before it is returned for further processing in either commit or abort
handling method. It may be the case that the transaction progress all
the way to `completed_commit` state, in this case Redpanda should return
a success to client as the transaction was finished.

Fixed a bug leading to the situation in which an invalid transaction
state error was returned when transaction was progressed to
`completed_commit` phase before entering a commit transaction handler.
The fix makes the `EndTxn` request fully idempotent.

Signed-off-by: Michał Maślanka <[email protected]>
(cherry picked from commit 2835bb0)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Aug 19, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Aug 19, 2024
@piyushredpanda piyushredpanda modified the milestones: v24.2.x-next, v24.2.3 Aug 19, 2024
@piyushredpanda piyushredpanda merged commit 696ef96 into redpanda-data:v24.2.x Aug 19, 2024
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants