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] [CORE-5698] Fixed issue with error mapping in add_partitions_to_txn #21585

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #21503

Added validation of transaction state transition before beginning
transaction on participant data/group partitions to prevent from state
inconsistencies.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 84daf51)
Changed the way how the error returned from update transaction in
`do_add_parititons_to_txn` is handled. Previously every error in state
update resulted in `invalid_txn_state` error. This not the case for most
of the errors as client should simply retry the request. Beginning
transaction on data and group partitions is idempotent so it can be
safely done once again when handling request retry.

Fixes: CORE-5698

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 3ea2fe5)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Jul 23, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jul 23, 2024
@mmaslankaprv mmaslankaprv merged commit 41cc76c into redpanda-data:v24.2.x Jul 24, 2024
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