-
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
[fix][broker] Fix the applying of namespace policies #22504
Conversation
64e83cf
to
7bc6d44
Compare
7bc6d44
to
d9fc1c1
Compare
@@ -4025,16 +4028,19 @@ private void updateSubscriptionsDispatcherRateLimiter() { | |||
}); | |||
} | |||
|
|||
protected CompletableFuture<Void> initTopicPolicy() { | |||
protected CompletableFuture<Void> initTopicPolicyAndApply() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call thread is getOrderedExecutor()
.
43bd4e2
to
131af38
Compare
Check CI errors first |
/pulsarbot rerun-failure-checks |
8bf364b
to
131af38
Compare
@@ -111,7 +111,8 @@ public void readEntriesFailed(ManagedLedgerException exception, Object ctx) { | |||
callback.readEntriesComplete(entries, ctx); | |||
recycle(); | |||
}); | |||
} else if (cursor.config.isAutoSkipNonRecoverableData() && exception instanceof NonRecoverableLedgerException) { | |||
} else if (cursor.getManagedLedger().getConfig().isAutoSkipNonRecoverableData() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()
.
@liudezhi2098 The CI has been passed. |
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
fcbf307
to
3aaa7d5
Compare
Closed by #22890 |
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
, andallowAutoUpdateSchema
to theHierarchyTopicPolicies
to unify the policiesDocumentation
doc
doc-required
doc-not-needed
doc-complete