Skip to content

[CORE-15045] Cloud Topics: Object path random prefix#29066

Merged
oleiman merged 3 commits into
redpanda-data:devfrom
oleiman:ct/core-15045/l0-obj-key-pfx
Dec 22, 2025
Merged

[CORE-15045] Cloud Topics: Object path random prefix#29066
oleiman merged 3 commits into
redpanda-data:devfrom
oleiman:ct/core-15045/l0-obj-key-pfx

Conversation

@oleiman

@oleiman oleiman commented Dec 19, 2025

Copy link
Copy Markdown
Member

Adds a random int in [0, 999] to cloud_topics::object_id, inserting it as a 3-digit prefix to the epoch ID in object path names.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

  • none

@oleiman oleiman self-assigned this Dec 19, 2025
@oleiman oleiman force-pushed the ct/core-15045/l0-obj-key-pfx branch 2 times, most recently from 2542b57 to 8f2f7ca Compare December 19, 2025 01:11
@oleiman oleiman marked this pull request as ready for review December 19, 2025 01:12
Copilot AI review requested due to automatic review settings December 19, 2025 01:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a random 3-digit numeric prefix (ranging from 0-999) to cloud topic object paths to improve object distribution in cloud storage. The prefix is inserted between the data directory and the epoch ID in the path structure.

Key Changes:

  • Adds a prefix field to object_id struct with random generation on object creation
  • Updates object path format from level_zero/data/{epoch}/{uuid} to level_zero/data/{prefix}/{epoch}/{uuid}
  • Implements parsing function level_zero_path_to_prefix() to extract prefix from object paths

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/v/cloud_topics/types.h Adds prefix field to object_id struct, updates serde version, and implements random prefix generation
src/v/cloud_topics/object_utils.h Declares new level_zero_path_to_prefix() function for parsing prefix from paths
src/v/cloud_topics/object_utils.cc Updates path formatting logic and implements prefix parsing with validation
src/v/cloud_topics/tests/object_utils_test.cc Updates existing test cases for new path format and adds comprehensive tests for prefix parsing
src/v/cloud_topics/BUILD Adds dependency on random generators library

Comment thread src/v/cloud_topics/object_utils.cc
@vbotbuildovich

vbotbuildovich commented Dec 19, 2025

Copy link
Copy Markdown
Collaborator

Retry command for Build#78177

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/cloud_topics/l0_gc_test.py::CloudTopicsL0GCTest.test_l0_gc@{"cloud_storage_type":2}
tests/rptest/tests/cloud_topics/l0_gc_test.py::CloudTopicsL0GCTest.test_l0_gc@{"cloud_storage_type":1}
tests/rptest/tests/topic_creation_test.py::TopicRecreateTest.test_cloud_topic_recreation_while_producing
tests/rptest/tests/random_node_operations_smoke_test.py::RedpandaNodeOperationsSmokeTest.test_node_ops_smoke_test@{"cloud_storage_type":1,"mixed_versions":false}

@vbotbuildovich

vbotbuildovich commented Dec 19, 2025

Copy link
Copy Markdown
Collaborator

CI test results

test results on build#78177
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
CloudTopicsL0GCTest test_l0_gc {"cloud_storage_type": 2} integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3459-2324-4e92-a3f2-0d558d0722ac FAIL 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCTest&test_method=test_l0_gc
CloudTopicsL0GCTest test_l0_gc {"cloud_storage_type": 2} integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3463-a4b3-41b6-ba81-e9199f55ba1c FAIL 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCTest&test_method=test_l0_gc
CloudTopicsL0GCTest test_l0_gc {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3459-2326-4b0a-bfdf-42c75654e31d FAIL 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCTest&test_method=test_l0_gc
CloudTopicsL0GCTest test_l0_gc {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3463-a4b3-42e7-8b65-bac1e55914e9 FAIL 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCTest&test_method=test_l0_gc
RedpandaNodeOperationsSmokeTest test_node_ops_smoke_test {"cloud_storage_type": 1, "mixed_versions": false} integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3459-2327-4fc4-9e10-fb3b0dc2479b FLAKY 2/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0032, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RedpandaNodeOperationsSmokeTest&test_method=test_node_ops_smoke_test
RedpandaNodeOperationsSmokeTest test_node_ops_smoke_test {"cloud_storage_type": 1, "mixed_versions": false} integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3463-a4b4-48ce-81df-c96df3035507 FLAKY 1/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0032, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RedpandaNodeOperationsSmokeTest&test_method=test_node_ops_smoke_test
TopicRecreateTest test_cloud_topic_recreation_while_producing null integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3459-2329-4ddd-a15f-b6e60b2c8704 FLAKY 4/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TopicRecreateTest&test_method=test_cloud_topic_recreation_while_producing
TopicRecreateTest test_cloud_topic_recreation_while_producing null integration https://buildkite.com/redpanda/redpanda/builds/78177#019b3463-a4b5-4ffa-9512-a4e01705ae2a FLAKY 1/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TopicRecreateTest&test_method=test_cloud_topic_recreation_while_producing
test results on build#78193
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
MountUnmountIcebergTest test_simple_remount {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/78193#019b3571-5ed8-4d8a-9494-6ca01d89e253 FLAKY 7/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.1822, p0=0.2693, reject_threshold=0.0100. adj_baseline=0.4531, p1=0.2595, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=MountUnmountIcebergTest&test_method=test_simple_remount

@oleiman oleiman marked this pull request as draft December 19, 2025 05:22
@oleiman oleiman force-pushed the ct/core-15045/l0-obj-key-pfx branch from 8f2f7ca to 0f9df41 Compare December 19, 2025 06:04
@oleiman oleiman marked this pull request as ready for review December 19, 2025 06:04
@oleiman oleiman force-pushed the ct/core-15045/l0-obj-key-pfx branch from 0f9df41 to 8342a18 Compare December 19, 2025 06:28
But don't add it to the path yet.
@oleiman oleiman marked this pull request as draft December 19, 2025 19:06
@oleiman oleiman force-pushed the ct/core-15045/l0-obj-key-pfx branch from 8342a18 to 99031bf Compare December 19, 2025 19:08
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
- should encourage good partitioning on the backend
- useful for sharding outstanding collection work in GC

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
@oleiman oleiman force-pushed the ct/core-15045/l0-obj-key-pfx branch from 99031bf to 38a733c Compare December 19, 2025 19:11
@oleiman oleiman marked this pull request as ready for review December 19, 2025 19:13
@oleiman oleiman merged commit 2a85f9c into redpanda-data:dev Dec 22, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants