From d4735bcd95a753aceecdf05fd766deb164d9de42 Mon Sep 17 00:00:00 2001 From: Evgeny Lazin Date: Thu, 16 May 2024 13:30:31 +0000 Subject: [PATCH] archival: Disable housekeeping jobs on startup When the archiver is created there is a small window of opportunity for it to run some housekeeping jobs before the manifest is synced. This commit disables the housekeeping jobs in the contstructor to avoid this. --- src/v/archival/ntp_archiver_service.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/v/archival/ntp_archiver_service.cc b/src/v/archival/ntp_archiver_service.cc index fa85fe12bd401..03d92e98ee63c 100644 --- a/src/v/archival/ntp_archiver_service.cc +++ b/src/v/archival/ntp_archiver_service.cc @@ -239,6 +239,13 @@ ntp_archiver::ntp_archiver( _next_housekeeping = _housekeeping_jitter(); }); + if (_local_segment_merger) { + _local_segment_merger->set_enabled(false); + } + if (_scrubber) { + _scrubber->set_enabled(false); + } + _start_term = _parent.term(); // Override bucket for read-replica if (_parent.is_read_replica_mode_enabled()) {