-
Notifications
You must be signed in to change notification settings - Fork 580
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
tx/tm_stm: fix unboundedness of _pid_tx_id #18198
Conversation
218039f
to
04c8f61
Compare
04c8f61
to
9c4b8e5
Compare
new failures in https://buildkite.com/redpanda/redpanda/builds/48581#018f3649-8a4a-4640-89b0-210831c63dff:
new failures in https://buildkite.com/redpanda/redpanda/builds/48581#018f3649-8a52-47cc-a991-97884e9ce7c9:
new failures in https://buildkite.com/redpanda/redpanda/builds/48581#018f3651-fb61-49b7-96ed-0e06eb403027:
new failures in https://buildkite.com/redpanda/redpanda/builds/48581#018f3651-fb6a-4f79-bbb9-598969acd494:
|
@@ -1297,6 +1316,7 @@ ss::future<cluster::init_tm_tx_reply> tx_gateway_frontend::do_init_tm_tx( | |||
|
|||
tx = r.value(); | |||
init_tm_tx_reply reply; | |||
model::producer_identity rolled_pid = tx.pid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use last_pid
to cleanup overwritten producer state here ? It seems that it has exactly the same purpose as the rolled_pid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I couldn't quite grok the difference between pid, last_pid and rolled_pid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As chatted offline, last_pid seems somewhat sketchy and not updated in all cases, added a clarifying comment.
/ci-repeat |
src/v/cluster/tm_stm.h
Outdated
@@ -307,6 +307,7 @@ class tm_stm final : public raft::persisted_stm<> { | |||
kafka::transactional_id, | |||
std::chrono::milliseconds, | |||
model::producer_identity, | |||
model::producer_identity, | |||
model::producer_identity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this would benefit from parameter names, 3 parameters with the same type but without names is a bit too much :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -1297,6 +1316,7 @@ ss::future<cluster::init_tm_tx_reply> tx_gateway_frontend::do_init_tm_tx( | |||
|
|||
tx = r.value(); | |||
init_tm_tx_reply reply; | |||
model::producer_identity rolled_pid = tx.pid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I couldn't quite grok the difference between pid, last_pid and rolled_pid
If there is a new producer_id, we do not need older incarnations of the same id as the corresponding transactions are sealed before re-registration.
fb0bede
to
4c1e662
Compare
/backport v24.1.x |
/backport v23.3.x |
/backport v23.2.x |
Failed to create a backport PR to v23.2.x branch. I tried:
|
If there is a new producer_id, we do not need older incarnations of the
same id as the corresponding transactions are sealed before
re-registration.
Backports Required
Release Notes