Skip to content

Commit

Permalink
Merge pull request #22917 from vbotbuildovich/backport-pr-22912-v24.2…
Browse files Browse the repository at this point in the history
….x-912

[v24.2.x] tx: do not throw USE on expired transaction_ids
  • Loading branch information
piyushredpanda authored Aug 19, 2024
2 parents 942a318 + 25a2d80 commit ab8c4f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/v/cluster/tx_gateway_frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ ss::future<tx_gateway_frontend::op_result_t> tx_gateway_frontend::do_end_txn(
"commit/abort",
request.transactional_id,
pid);
err = tx::errc::unknown_server_error;
err = tx::errc::invalid_producer_id_mapping;
}
outcome->set_value(err);
co_return err;
Expand Down
5 changes: 3 additions & 2 deletions tests/rptest/transactions/transactions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,9 @@ def transaction_id_expiration_test(self):
try:
producer.commit_transaction()
assert False, "transaction should have been aborted by now."
except ck.KafkaException:
pass
except ck.KafkaException as e:
assert e.args[0].code(
) == ck.KafkaError.INVALID_PRODUCER_ID_MAPPING, f"Invalid error thrown on expiration {e}"

@cluster(num_nodes=3)
def expired_tx_test(self):
Expand Down

0 comments on commit ab8c4f5

Please sign in to comment.