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

Migrations accept hint #23826

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

bashtanov
Copy link
Contributor

@bashtanov bashtanov commented Oct 17, 2024

As discussed with Matt, accept location hint as part of source topic name when mounting

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

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Oct 17, 2024

Retry command for Build#56743

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

/ci-repeat 1
tests/rptest/transactions/transactions_test.py::TxUpgradeRevertTest.test_snapshot_compatibility
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_conflicting_names

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Oct 17, 2024

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/56743#01929b27-8d27-4422-a6e6-d7c14b2f6086:

"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_conflicting_names"

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/56810#01929fa8-80a4-4100-adb3-ec4ea05f5a51:

"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=None.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.out.stage=.executed.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.executed.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.prepared.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.executing.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.preparing.use_alias=False"

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/56810#01929fa8-80a5-4f7d-a4b4-36c1302c60ee:

"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.executed.use_alias=True"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.prepared.use_alias=True"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.out.stage=.executing.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=None.use_alias=True"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.executing.use_alias=True"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.preparing.use_alias=True"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.out.stage=.preparing.use_alias=False"

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/56810#01929fa8-80a7-44c4-8717-52ff20303943:

"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.executing.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.preparing.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=False.params=TmtpdiParams.cancellation=CancellationStage.dir=.out.stage=.prepared.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.executed.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.in.stage=.prepared.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=CancellationStage.dir=.out.stage=.executed.use_alias=False"
"rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=TmtpdiParams.cancellation=None.use_alias=False"

Comment on lines 32 to 41
// extract location hint from topic name
ss::sstring tp_hinted = ret.source_topic_name.tp;
auto slash_pos = tp_hinted.find('/');
if (slash_pos != seastar::sstring::npos) {
ret.cloud_storage_location
= cluster::data_migrations::cloud_storage_location{
.hint = tp_hinted.substr(slash_pos + 1)};
ret.source_topic_name.tp = model::topic(
std::move(tp_hinted).substr(0, slash_pos));
}
Copy link
Member

Choose a reason for hiding this comment

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

use abseil or boost string splitting? (e.g. absl::StrSplit)

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Oct 18, 2024

Retry command for Build#56810

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_migrated_topic_data_integrity@{"params":[["in","executed"],true],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","prepared"],true],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["out","executing"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[null,true],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","executing"],true],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","preparing"],true],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["out","preparing"],false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","executing"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","preparing"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["out","prepared"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","executed"],false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","prepared"],false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["out","executed"],false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[null,false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[null,false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["out","executed"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","executed"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","prepared"],false],"transfer_leadership":false}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","executing"],false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["in","preparing"],false],"transfer_leadership":true}
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_migrated_topic_data_integrity@{"params":[["out","prepared"],false],"transfer_leadership":true}

Copy link

@asimms41 asimms41 left a comment

Choose a reason for hiding this comment

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

Added a suggestion for the source_topic description.

src/v/redpanda/admin/api-doc/migration.def.json Outdated Show resolved Hide resolved
@@ -522,6 +522,10 @@ ss::future<errc> backend::do_topic_work(
state sought_state,
const inbound_topic_work_info& itwi,
tsws_lwptr_t tsws) {
vlog(
dm_log.trace,
"itwi.cloud_storage_location = {}",
Copy link
Member

Choose a reason for hiding this comment

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

can we add more context here f.e. the topic, the itwi is not very informative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it logged in the universal do_topic_work instead, both for in- and outbound migrations

@bashtanov
Copy link
Contributor Author

/dt

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.

5 participants