Skip to content

Commit dfd6695

Browse files
cluster: install the eviction STM on cloud-topic partitions
Drop the cloud_topic_enabled() guard from log_eviction_stm_factory so the eviction STM is installed on cloud-topic partitions too. A partition migrating from tiered storage is still served from its local log + archival manifest and must keep supporting prefix truncation (DeleteRecords) while migrating; the trigger flips storage_mode to cloud without reconstructing the partition, and a still-migrating partition is reconstructed cloud-mode on restart/recovery, so the STM must already be present. On a native cloud topic it is an inert passenger. Subsequent integration tests will provide coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 52b9849 commit dfd6695

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/v/cluster/log_eviction_stm.cc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,15 @@ log_eviction_stm_factory::log_eviction_stm_factory(storage::kvstore& kvstore)
384384

385385
bool log_eviction_stm_factory::is_applicable_for(
386386
const storage::ntp_config& cfg) const {
387-
if (cfg.cloud_topic_enabled()) {
388-
return false;
389-
}
387+
// (No cloud_topic_enabled() == false guard.) Install the eviction STM on
388+
// cloud-topic partitions too. STM membership is fixed at construction and a
389+
// tiered->cloud migration does not reconstruct the partition, so a
390+
// partition migrating from tiered storage -- still served from its local
391+
// log + archival manifest -- must already carry the eviction STM to keep
392+
// supporting prefix truncation (DeleteRecords) and retention while
393+
// migrating. On a native cloud topic it is an inert passenger: retention
394+
// and DeleteRecords go through the L1 path, so no local eviction requests
395+
// are generated.
390396
return !storage::deletion_exempt(cfg.ntp());
391397
}
392398

0 commit comments

Comments
 (0)