Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rystsov committed Jul 27, 2023
1 parent d3d8bdf commit a60b2b6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/v/cluster/tm_stm_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ void tm_stm_cache::set_log(tm_transaction tx) {
}
unlink_lru_tx(tx_it->second);
lru_txes.push_back(tx_it->second);
vassert(
lru_txes.size() == _log_txes.size(),
"Unexpected entries in the lru tx list {}",
lru_txes.size());

for (auto& [term, entry] : _state) {
if (term < tx.etag) {
Expand All @@ -161,6 +165,10 @@ void tm_stm_cache::erase_log(kafka::transactional_id tx_id) {

unlink_lru_tx(tx_it->second);
_log_txes.erase(tx_it);
vassert(
lru_txes.size() == _log_txes.size(),
"Unexpected entries in the lru tx list {}",
lru_txes.size());
}

fragmented_vector<tm_transaction> tm_stm_cache::get_log_transactions() {
Expand Down Expand Up @@ -204,7 +212,7 @@ void tm_stm_cache::clear_log() {
}
_log_txes.clear();
vassert(
lru_txes.size() == 0,
lru_txes.size() == _log_txes.size(),
"Unexpected entries in the lru tx list {}",
lru_txes.size());
}
Expand Down

0 comments on commit a60b2b6

Please sign in to comment.