[fix][broker] Fix the applying of namespace policies#22504
Closed
nodece wants to merge 3 commits into
Closed
Conversation
64e83cf to
7bc6d44
Compare
7bc6d44 to
d9fc1c1
Compare
nodece
commented
Apr 15, 2024
| } | ||
|
|
||
| protected CompletableFuture<Void> initTopicPolicy() { | ||
| protected CompletableFuture<Void> initTopicPolicyAndApply() { |
Member
Author
There was a problem hiding this comment.
This call thread is getOrderedExecutor().
43bd4e2 to
131af38
Compare
Contributor
|
Check CI errors first |
Member
Author
|
/pulsarbot rerun-failure-checks |
8bf364b to
131af38
Compare
nodece
commented
Apr 16, 2024
| recycle(); | ||
| }); | ||
| } else if (cursor.config.isAutoSkipNonRecoverableData() && exception instanceof NonRecoverableLedgerException) { | ||
| } else if (cursor.getManagedLedger().getConfig().isAutoSkipNonRecoverableData() |
Member
Author
There was a problem hiding this comment.
cursor.config equals getManagedLedger().getConfig().
When the topic is loaded, org.apache.pulsar.broker.service.persistent.PersistentTopic#checkPersistencePolicies will be called, which changes the ledger config, but the cursor.config will not be changed, so we need to fix that to get the latest config.
BTW, the cursor.conf should be deleted, and we should always call the getManagedLedger().getConfig().
Member
Author
|
@liudezhi2098 The CI has been passed. |
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
fcbf307 to
3aaa7d5
Compare
4 tasks
Member
Author
|
Closed by #22890 |
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
I'm using the rate limiter on the replicator, when an existing topic is initializing, and the replicator's cursor exists, the topic will create the replicator, and then load and apply the namespace and topic policies to the topic(which includes the replicator), but I found the rate limiter doesn't work.
The namespace policies will not be applied to the replicator after the broker restart.
When will this happen:
Modifications
resourceGroup,encryptionRequired, andallowAutoUpdateSchemato theHierarchyTopicPoliciesto unify the policiesDocumentation
docdoc-requireddoc-not-neededdoc-complete