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

[v23.1.x] tm_stm: add tx to cache on create #14802

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #14784
Fixes: #14800,

@vbotbuildovich vbotbuildovich added this to the v23.1.x-next milestone Nov 7, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Nov 7, 2023
A test using transaction would randomly fail with
`INVALID_PRODUCER_ID_MAPPING` if the transaction coordinator leader
would change between the producer issued `InitProducerId` and
`AddPartitionsToTxn`. Since [Fixes Unknown Server Errors (USE) in
transactions][1], this should not happen as we cache transaction
state and fetch it from all nodes. However, it appears we forgot to
cache the state after the `InitProducerId` request. This PR fixes that
and updates a test that catches the problem and validates the fix.

Fixes redpanda-data#13736

[1]: redpanda-data#7591

(cherry picked from commit 6bcb0b0)
@nvartolomei nvartolomei marked this pull request as ready for review November 7, 2023 20:59
@nvartolomei nvartolomei self-assigned this Nov 7, 2023
@mmaslankaprv mmaslankaprv merged commit eeee97a into redpanda-data:v23.1.x Nov 8, 2023
26 of 27 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.1.x-next, v23.1.21 Dec 12, 2023
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.

4 participants