Skip to content

Commit

Permalink
Merge pull request redpanda-data#14784 from nvartolomei/nv/investigat…
Browse files Browse the repository at this point in the history
…e-13736

tm_stm: add tx to cache on create
  • Loading branch information
mmaslankaprv authored Nov 7, 2023
2 parents c4277e0 + 6bcb0b0 commit b45438b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/v/cluster/tm_stm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,8 @@ ss::future<tm_stm::op_status> tm_stm::do_register_new_producer(
co_return tm_stm::op_status::unknown;
}

_cache->set_mem(tx.etag, tx_id, tx);

co_return tm_stm::op_status::success;
}

Expand Down
2 changes: 2 additions & 0 deletions tests/rptest/tests/transactions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ def leader_is_changed():
backoff_sec=2,
err_msg="Failed to establish current leader")

# Issue a leadership transfer
graceful_transfer()
# Add some records
add_records()
# Issue a leadership transfer
Expand Down

0 comments on commit b45438b

Please sign in to comment.