-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][pip] PIP-321 Introduce allowed-cluster
at the namespace level
#21648
Merged
liangyepianzhou
merged 11 commits into
apache:master
from
liangyepianzhou:pip/allowed-clusters
Jan 23, 2024
Merged
[improve][pip] PIP-321 Introduce allowed-cluster
at the namespace level
#21648
liangyepianzhou
merged 11 commits into
apache:master
from
liangyepianzhou:pip/allowed-clusters
Jan 23, 2024
Conversation
This file contains 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
github-actions
bot
added
type/PIP
doc-not-needed
Your PR changes do not impact docs
labels
Nov 30, 2023
@Technoboy- Your comments will highly appreciated in the discussion of this PIP in the mailing list. |
…eplication at the topic level
Replied |
1. The issue of 'Global Topic Policies Not Replicating as Expected' has been separated and will be addressed in a subsequent proposal or discussion. 2. Added CLI commands for setting and retrieving allowed clusters at the namespace level. 3. Clarified the authentication requirements for accessing the new API endpoints. 4. Enhanced the exposition in the 'Background' and 'Motivation' sections for better understanding.
poorbarcode
reviewed
Dec 26, 2023
codelipenghui
dismissed
a stale review
December 27, 2023 08:58
Need to confirm the if the last step in PIP-8 is required.
liangyepianzhou
changed the title
[improve][pip] PIP-321 Split the responsibilities of namespace replication-clusters
[improve][pip] PIP-321 Introduce Jan 22, 2024
allowed-cluster
at the namespace level
codelipenghui
approved these changes
Jan 23, 2024
2. When the `--allowed-clusters` option is not specified, the `--clusters` option will be used as `--allowed-clusters`.
poorbarcode
approved these changes
Jan 23, 2024
15 tasks
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
According to the introduction on our official website, geo-replication can be enabled at the namespace level or topic level.
But in the current implementation, creating producer and consumer will check if the cluster is configured in the namespace policy instead of the topic policy. So if replication is only enabled at the topic level, the replicator will connect fail when creating a producer.
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
Lines 480 to 497 in b949187
Why Does This Situation Occur and the Associated Modifications
Validation on PartitionedMetadata-Lookup: Fail request if global namespace's replication-clusters doesn't contain current/peer-clusters (Earlier this validation was only present at lookup only). So, client can't create producer/consumer object and doesn't do internal retry for lookup.
This PR supports the configuration of geo-replication at the topic level.
However, this PR's test only included tests for policy change, and there was no test to see if replication could work normally if only enabled on the topic level.
Modifications
Use
replication-clusters
,allowed-clusters
to replace a singlereplication-clusters
originally in the namespace policy.See more explanation in the proposal.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: