-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Check migration cluster exist when enable namespace migration in blue-green migration #22362
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
Conversation
…te in blue-green migration
|
Please help me review it when you have time. @vraulji567 @rdhabalia @eolivelli Thank you so much. |
|
/pulsarbot rerun-failure-checks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22362 +/- ##
============================================
- Coverage 73.57% 72.90% -0.68%
+ Complexity 32624 32304 -320
============================================
Files 1877 1892 +15
Lines 139502 145784 +6282
Branches 15299 16776 +1477
============================================
+ Hits 102638 106279 +3641
- Misses 28908 31227 +2319
- Partials 7956 8278 +322
Flags with carried forward coverage won't be shown. Click here to find out more.
|
# Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
|
close & reopen to trigger CI |
|
close & reopen to trigger CI |
Motivation
#21367 Support to migrate topics from blue to green cluster per namespace
But when we enable namespace migration, there was no check if the migrate cluster existed. There will be some unusual situations here.
Minimal reproduce step:
1.Start a single broker node and create a tenant
test-tenantsh bin/pulsar-admin tenants create test-tenant
2.Create a new namespace and a topic.
sh bin/pulsar-admin namespaces create test-tenant/test-ns
sh bin/pulsar-admin topics create test-tenant/test-ns/test-topic
3.Enable namespaces migration
sh bin/pulsar-admin namespaces update-migration-state --migrated test-tenant/test-ns
We will see the following log:

Modifications
clusterData is existsandisNamespaceMigrationEnabled=truesatisfied at the same time in methodgetMigratedClusterUrlAsyncDocumentation
docdoc-requireddoc-not-neededdoc-complete