From 101dd673dd7c493e0effc4ec1713188754281e3b Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Mon, 8 Jul 2024 15:05:13 -0700 Subject: [PATCH] cluster: add comment clarifying path provider usage Adds a comment clarifying the usage of a path provider at partition startup time. This is review follow-up to https://github.com/redpanda-data/redpanda/pull/20778 --- src/v/cluster/partition_manager.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/v/cluster/partition_manager.cc b/src/v/cluster/partition_manager.cc index b99586a1b7aa8..30806c61ffcaf 100644 --- a/src/v/cluster/partition_manager.cc +++ b/src/v/cluster/partition_manager.cc @@ -122,6 +122,11 @@ ss::future partition_manager::manage( raft::keep_snapshotted_log keep_snapshotted_log, std::optional remote_label) { auto guard = _gate.hold(); + // NOTE: while the source cluster UUIDs of the path providers will + // ultimately be the same, this is a different path provider than what will + // be used at runtime by the partition. The latter is owned by the archival + // metadata STM and its lifecycle is therefore tied to the partition, which + // hasn't been constructed yet. cloud_storage::remote_path_provider path_provider(remote_label); auto dl_result = co_await maybe_download_log(ntp_cfg, rtp, path_provider); auto& [logs_recovered, clean_download, min_offset, max_offset, manifest, ot_state]