Skip to content

Commit

Permalink
tx/frontend: comment clarifying rolled_pid vs last_pid
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathv committed May 2, 2024
1 parent 834025c commit 4c1e662
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/v/cluster/tx_gateway_frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,12 @@ ss::future<cluster::init_tm_tx_reply> tx_gateway_frontend::do_init_tm_tx(

tx = r.value();
init_tm_tx_reply reply;
// note: while rolled_pid and last_pid look very similar in intent which is
// to track previous incarnation of this transaction_id, it doesn't seem to
// work like that in practice. last_pid is not set in all cases (refer to
// kip-360 for details) whereas we want to cleanup older epochs state in all
// cases, hence a separate rolled_pid was added. This is definitely not
// ideal, probably needs a closer look.
model::producer_identity rolled_pid = tx.pid;
model::producer_identity last_pid = model::unknown_pid;

Expand Down

0 comments on commit 4c1e662

Please sign in to comment.