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

c/migrations: list mountable topics #23601

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

nvartolomei
Copy link
Contributor

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
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

src/v/cluster/data_migration_frontend.cc Outdated Show resolved Hide resolved
src/v/redpanda/admin/api-doc/migration.def.json Outdated Show resolved Hide resolved
tests/rptest/tests/data_migrations_api_test.py Outdated Show resolved Hide resolved
@nvartolomei nvartolomei force-pushed the nv/list-unmounted branch 11 times, most recently from 8e38ad1 to fe3561c Compare October 4, 2024 09:39
@nvartolomei nvartolomei marked this pull request as ready for review October 4, 2024 09:39
@nvartolomei nvartolomei requested a review from a team as a code owner October 4, 2024 09:39
@nvartolomei
Copy link
Contributor Author

@bashtanov @andrwng this is ready for review.

micheleRP
micheleRP previously approved these changes Oct 4, 2024
Copy link

@micheleRP micheleRP left a comment

Choose a reason for hiding this comment

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

looks good from docs

dotnwat
dotnwat previously requested changes Oct 8, 2024
Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

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

b288d47, which appears to be the substantive commit of this PR, needs a commit message description.

@bashtanov
Copy link
Contributor

bashtanov commented Oct 9, 2024

and split this last commit perhaps, as it is 19 files and 500+ lines

@nvartolomei nvartolomei force-pushed the nv/list-unmounted branch 2 times, most recently from 12f9924 to 61420e9 Compare October 9, 2024 18:56
@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Oct 9, 2024

Comment on lines 188 to 189
.label = cloud_storage::remote_label(
path_parse_result->cluster_uuid()),
Copy link
Contributor

Choose a reason for hiding this comment

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

@nvartolomei Willem is adding revision to the mount manifest path in #23730. Once it is merged, can we return {uuid}/{rev} here? The plan is to support a hint from user when mounting, and the hint is a prefix for this path component of the topic manifest. If there are multiple unmounted topics with the same name and cluster UUID having a revision would be beneficial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we keep them separate and ask user 3 fields (label (cluster uuid), topic, revision)? Because that's how things are represented in most parts. I'm afraid that putting together the label/cluster uuid with revision id will cause confusion long term... It is an accident for the most part that label and rev id are next to each other here (topic manifest). I.e. partition manifest, the path is <label>/meta/<ns>/<topic>/<partition>_<revision> and who knows what we'll come up with down the road.

@nvartolomei nvartolomei requested a review from bashtanov October 21, 2024 14:52
@nvartolomei nvartolomei force-pushed the nv/list-unmounted branch 2 times, most recently from c1c3bf1 to 0ea313d Compare October 21, 2024 15:49
Copy link
Contributor

@bashtanov bashtanov left a comment

Choose a reason for hiding this comment

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

LGTM, a few silly questions from me.
Also we may need to rename unmounted->mountable as discussed on slack.

src/v/cloud_storage/remote_path_provider.cc Outdated Show resolved Hide resolved
src/v/cloud_storage/remote_label.h Outdated Show resolved Hide resolved
src/v/cloud_storage/topic_mount_handler.h Outdated Show resolved Hide resolved
@nvartolomei nvartolomei changed the title c/migrations: list unmounted topics c/migrations: list mountable topics Oct 23, 2024
@nvartolomei nvartolomei requested a review from bashtanov October 23, 2024 13:46
@vbotbuildovich
Copy link
Collaborator

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/57053#0192b9fa-d87c-4777-90e8-c916b6719851:

"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_list_mountable_topics"

@vbotbuildovich
Copy link
Collaborator

Retry command for Build#57053

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

/ci-repeat 1
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_list_mountable_topics

src/v/cloud_storage/topic_mount_manifest_path.h Outdated Show resolved Hide resolved
src/v/cluster/data_migration_frontend.cc Outdated Show resolved Hide resolved
src/v/redpanda/admin/topics.cc Show resolved Hide resolved
src/v/cluster/data_migration_frontend.cc Show resolved Hide resolved
We want to use parsing functionality for listing unmounted topics.
This will allow the same fixture to be used for multiple test suites
We will expose this method through the admin api.

A topic for which a mount manifest exists in cloud storage is consider
mountable. We list mountable topics by listing the prefix where these
manifests are stored and parsing label, namespace, and topic from the
object name.
I plan to reuse the same topic mount handler in the migration frontend
as well to implement listing of unmounted topics. Lift it up in this
commit. In subsequent commit it will be injected and used in the
frontend.
@nvartolomei nvartolomei requested a review from dotnwat October 24, 2024 09:40
@nvartolomei nvartolomei dismissed dotnwat’s stale review October 24, 2024 12:58

All addressed. Happy to follow up.

@nvartolomei nvartolomei merged commit 5cf22c0 into redpanda-data:dev Oct 24, 2024
18 checks passed
@nvartolomei nvartolomei deleted the nv/list-unmounted branch October 24, 2024 12:58
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.

8 participants