[improve][broker]Part-2 of PIP-433 add validation when enabling namespace-level Geo-Replication#25170
Open
poorbarcode wants to merge 2 commits intoapache:masterfrom
Open
[improve][broker]Part-2 of PIP-433 add validation when enabling namespace-level Geo-Replication#25170poorbarcode wants to merge 2 commits intoapache:masterfrom
poorbarcode wants to merge 2 commits intoapache:masterfrom
Conversation
…pace-level Geo-Replication
Technoboy-
reviewed
Jan 26, 2026
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Show resolved
Hide resolved
Denovo1998
suggested changes
Jan 26, 2026
Contributor
Denovo1998
left a comment
There was a problem hiding this comment.
@poorbarcode
1.Partition consistency verification is "one-way" (only starting from the local topic).
- The current logic will not detect the situation where "the remote already has a topic (and it may conflict with the local one in the future) but the local hasn't been created yet."
- The test does not cover the case where "topic only exists remotely and conflicts with local policy".
2.Performance risk: Calling getPartitionedTopicMetadataAsync remotely once for each topic under the namespace
Should we consider concurrency limiting (semaphore), batching, or state in the document/comments that this is an admin operation and may take time?
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Outdated
Show resolved
Hide resolved
...ker/src/test/java/org/apache/pulsar/broker/service/SetReplicationClustersValidationTest.java
Outdated
Show resolved
Hide resolved
Technoboy-
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This is part-2 of PIP-433.
Modifications
Checks compatibility between two clusters when enabling namespace-level replication, which includes the following
Documentation
docdoc-requireddoc-not-neededdoc-complete