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

cloud_storage: add clarifying comments around naming and versions #20586

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions src/v/cloud_storage/partition_path_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@

namespace cloud_storage {

// Redpanda has supported different formats and naming schemes for partition
// manifests through its lifetime:
// - v24.2 and up: cluster-uuid-labeled name, binary format
// - v23.2 and up: hash-prefixed name, binary format
// - below v23.2: hash-prefixed name, JSON format
//
// Because manifests are persistent state, we must be able to access older
// versions, in cases we need to read when newer manifests have not yet been
// written. This header contains methods to build paths for all versions.

// 806a0f4a-e691-4a2b-9352-ec4b769a5e6e/meta/kafka/panda-topic/0_123
ss::sstring labeled_partition_manifest_prefix(
const remote_label& cluster_hint,
Expand Down
13 changes: 13 additions & 0 deletions src/v/cloud_storage/segment_path_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@

namespace cloud_storage {

// Redpanda has supported different naming schemes for segments through its
// lifetime:
// - v24.2 and up: cluster-uuid-labeled name
// - below v24.2: hash-prefixed name
//
// Because segments are persistent state, we must be able to access older
// versions, in cases we need to read when newer manifests have not yet been
// written. This header contains methods to build paths for all versions.
//
// NOTE: the exact segment-name format is still determined by manifest state.
// As such, this class only guides the prefix, and leaves filename generation
// to callers (typically via methods in partition_manifest).

// 806a0f4a-e691-4a2b-9352-ec4b769a5e6e/kafka/panda-topic/0_123/0-100-1024-16-v1.log.16
ss::sstring labeled_segment_path(
const remote_label& remote_label,
Expand Down
10 changes: 10 additions & 0 deletions src/v/cloud_storage/topic_path_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@

namespace cloud_storage {

// Redpanda has supported different formats and naming schemes for topic
// manifests through its lifetime:
// - v24.2 and up: cluster-uuid-labeled name, binary format
// - v24.1 and up: hash-prefixed name, binary format
// - below v24.1: hash-prefixed name, JSON format
//
// Because manifests are persistent state, we must be able to access older
// versions, in cases we need to read when newer manifests have not yet been
// written. This header contains methods to build paths for all versions.

// meta/kafka/panda-topic
ss::sstring labeled_topic_manifest_root(const model::topic_namespace& topic);

Expand Down