Skip to content

Commit

Permalink
Merge pull request #10130 from jcsp/pr-10099-followup
Browse files Browse the repository at this point in the history
archival: remove redundant manifest upload after GC
  • Loading branch information
jcsp authored Apr 20, 2023
2 parents 35c5b11 + 408b7ca commit 4d89112
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/v/archival/ntp_archiver_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,8 @@ ss::future<bool> ntp_archiver::maybe_upload_manifest(const char* upload_ctx) {

ss::future<> ntp_archiver::maybe_flush_manifest_clean_offset() {
if (
_projected_manifest_clean_at.has_value()
&& ss::lowres_clock::now() - _last_marked_clean_time
> _manifest_upload_interval()) {
local_storage_pressure()
|| (_projected_manifest_clean_at.has_value() && ss::lowres_clock::now() - _last_marked_clean_time > _manifest_upload_interval())) {
co_return co_await flush_manifest_clean_offset();
}
}
Expand Down Expand Up @@ -1805,12 +1804,8 @@ ss::future<> ntp_archiver::housekeeping() {
// external housekeeping jobs from upload_housekeeping_service
// and retention/GC
auto units = co_await ss::get_units(_mutex, 1, _as);
const auto retention_updated_manifest = co_await apply_retention();
const auto gc_updated_manifest = co_await garbage_collect();
if (retention_updated_manifest || gc_updated_manifest) {
co_await upload_manifest(housekeeping_ctx_label);
co_await flush_manifest_clean_offset();
}
co_await apply_retention();
co_await garbage_collect();
}
} catch (std::exception& e) {
vlog(_rtclog.warn, "Error occured during housekeeping", e.what());
Expand Down

0 comments on commit 4d89112

Please sign in to comment.