Skip to content
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

[v23.2.x] cluster/tests: add test case for eviction of the tx coordinator #17530

Open
wants to merge 1 commit into
base: v23.2.x
Choose a base branch
from

Conversation

andrwng
Copy link
Contributor

@andrwng andrwng commented Apr 1, 2024

Backport of #17379
Fixes #17393

CONFLICT:

  • different CMakeLists surroundings

We've seen in older versions of Redpanda that despite the 'delete' cleanup policy being enabled, eviction may not be triggered. This is because in older versions of Redpanda[1], we would not register the eviction STM for tx coordinator partitions.

[1]

if (is_tx_manager_topic(_raft->ntp()) && _is_tx_enabled) {
_tm_stm = builder.create_stm<cluster::tm_stm>(
clusterlog,
_raft.get(),
_feature_table,
_tm_stm_cache_manager.local().get(_raft->ntp().tp.partition));
_raft->log()->stm_manager()->add_stm(_tm_stm);
co_return co_await _raft->start(std::move(builder));
}
if (is_transform_offsets_topic(_raft->ntp())) {
vassert(
topic_cfg.has_value(),
"No topic configuration passed, stm requires configuration for "
"partition count.");
_transform_offsets_stm = builder.create_stm<transform_offsets_stm_t>(
topic_cfg->partition_count, clusterlog, _raft.get());
}
/**
* Data partitions
*/
if (!storage::deletion_exempt(_raft->ntp())) {
_log_eviction_stm = builder.create_stm<cluster::log_eviction_stm>(
_raft.get(), clusterlog, _kvstore);
_raft->log()->stm_manager()->add_stm(_log_eviction_stm);
}

(cherry picked from commit 761dfe9) (cherry picked from commit c45abbd)

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x

Release Notes

  • none

@andrwng andrwng changed the title cluster/tests: add test case for eviction of the tx coordinator [v23.2.x] cluster/tests: add test case for eviction of the tx coordinator Apr 1, 2024
@piyushredpanda
Copy link
Contributor

/ci-repeat 1

CONFLICT:
- different CMakeLists surroundings
- swapped out RPTEST macros for boost_require_eventually

We've seen in older versions of Redpanda that despite the 'delete'
cleanup policy being enabled, eviction may not be triggered. This is
because in older versions of Redpanda[1], we would not register the
eviction STM for tx coordinator partitions.

[1] https://github.com/redpanda-data/redpanda/blob/3ce012f9ccb64810eafcc4b8b2e0df7340172879/src/v/cluster/partition.cc#L446-L471

(cherry picked from commit 761dfe9)
(cherry picked from commit c45abbd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants