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

archival: remove redundant manifest upload after GC #10130

Merged
merged 2 commits into from
Apr 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
Comment on lines -1808 to -1809
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also remove the ntp_archiver_service::manifest_updated type? It's not used anywhere else

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