-
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
[Broker] Refine topic level backlog quota policies warning log #11863
Merged
sijie
merged 4 commits into
apache:master
from
gaoran10:gaoran/refine-backlog-quota-topic-policies-warn-log
Sep 2, 2021
Merged
[Broker] Refine topic level backlog quota policies warning log #11863
sijie
merged 4 commits into
apache:master
from
gaoran10:gaoran/refine-backlog-quota-topic-policies-warn-log
Sep 2, 2021
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
michaeljmarshall
requested changes
Sep 1, 2021
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BacklogQuotaManager.java
Outdated
Show resolved
Hide resolved
codelipenghui
approved these changes
Sep 1, 2021
…acklogQuotaManager.java Co-authored-by: Michael Marshall <[email protected]>
hangc0276
approved these changes
Sep 1, 2021
michaeljmarshall
approved these changes
Sep 1, 2021
sijie
approved these changes
Sep 2, 2021
gaoran10
deleted the
gaoran/refine-backlog-quota-topic-policies-warn-log
branch
September 2, 2021 02:06
codelipenghui
pushed a commit
that referenced
this pull request
Sep 2, 2021
### Motivation Currently, if the `TopicPolicies` isn't initialized completely, the topic gets backlog quota will print the error log stack, this is not necessary, because after the TopicPolicies initialized, the topic level backlog quota will come into effect. ``` 15:24:01.962 [bookkeeper-ml-workers-OrderedExecutor-2-0] WARN org.apache.pulsar.broker.service.BacklogQuotaManager - Failed to read topic policies data, will apply the namespace backlog quota: topicName=persistent://public/ns3/t1 org.apache.pulsar.broker.service.BrokerServiceException$TopicPoliciesCacheNotInitException: Topic policies cache have not init. at org.apache.pulsar.broker.service.SystemTopicBasedTopicPoliciesService.getTopicPolicies(SystemTopicBasedTopicPoliciesService.java:148) ~[org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.BacklogQuotaManager.getBacklogQuota(BacklogQuotaManager.java:85) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.persistent.PersistentTopic.getBacklogQuota(PersistentTopic.java:2172) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.persistent.PersistentTopic.isBacklogQuotaExceeded(PersistentTopic.java:2181) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.ServerCnx.lambda$handleProducer$20(ServerCnx.java:1100) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) [?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) [?:?] at org.apache.pulsar.broker.service.BrokerService$3.lambda$openLedgerComplete$2(BrokerService.java:1125) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture.uniRunNow(CompletableFuture.java:815) [?:?] at java.util.concurrent.CompletableFuture.uniRunStage(CompletableFuture.java:799) [?:?] at java.util.concurrent.CompletableFuture.thenRun(CompletableFuture.java:2121) [?:?] at org.apache.pulsar.broker.service.BrokerService$3.openLedgerComplete(BrokerService.java:1111) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.lambda$asyncOpen$8(ManagedLedgerFactoryImpl.java:425) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) [?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) [?:?] at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl$2.initializeComplete(ManagedLedgerFactoryImpl.java:397) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$3.operationComplete(ManagedLedgerImpl.java:476) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$3.operationComplete(ManagedLedgerImpl.java:466) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.MetaStoreImpl.lambda$getCursors$8(MetaStoreImpl.java:122) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) [?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) [?:?] at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.60.Final.jar:4.1.60.Final] at java.lang.Thread.run(Thread.java:834) [?:?] ``` ### Modifications Remove the error log stack. (cherry picked from commit d370d00)
3 tasks
codelipenghui
pushed a commit
that referenced
this pull request
Sep 6, 2021
…licies (#11897) ### Motivation There is a bug that using the partitioned topic name to get topic policies. The PR #11294 fix this issue, but it's hard to cherry-pick the PR to `branch-2.7`, so create this PR to fix the issue in `branch-2.7`. This PR contains [PR-11294](#11294) and [PR-11863](#11863). ### Modifications 1. Fix using the partitioned topic name to get topic policies. 2. Change some warning logs to debug level for the getting topic policies operation. ### Verifying this change The test method `TopicPoliciesTest#testBacklogQuotaWithPartitionedTopic` is used to verify getting topic policies by the partitioned topic name.
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this pull request
Mar 18, 2022
…e#11863) ### Motivation Currently, if the `TopicPolicies` isn't initialized completely, the topic gets backlog quota will print the error log stack, this is not necessary, because after the TopicPolicies initialized, the topic level backlog quota will come into effect. ``` 15:24:01.962 [bookkeeper-ml-workers-OrderedExecutor-2-0] WARN org.apache.pulsar.broker.service.BacklogQuotaManager - Failed to read topic policies data, will apply the namespace backlog quota: topicName=persistent://public/ns3/t1 org.apache.pulsar.broker.service.BrokerServiceException$TopicPoliciesCacheNotInitException: Topic policies cache have not init. at org.apache.pulsar.broker.service.SystemTopicBasedTopicPoliciesService.getTopicPolicies(SystemTopicBasedTopicPoliciesService.java:148) ~[org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.BacklogQuotaManager.getBacklogQuota(BacklogQuotaManager.java:85) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.persistent.PersistentTopic.getBacklogQuota(PersistentTopic.java:2172) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.persistent.PersistentTopic.isBacklogQuotaExceeded(PersistentTopic.java:2181) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.pulsar.broker.service.ServerCnx.lambda$handleProducer$20(ServerCnx.java:1100) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) [?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) [?:?] at org.apache.pulsar.broker.service.BrokerService$3.lambda$openLedgerComplete$2(BrokerService.java:1125) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture.uniRunNow(CompletableFuture.java:815) [?:?] at java.util.concurrent.CompletableFuture.uniRunStage(CompletableFuture.java:799) [?:?] at java.util.concurrent.CompletableFuture.thenRun(CompletableFuture.java:2121) [?:?] at org.apache.pulsar.broker.service.BrokerService$3.openLedgerComplete(BrokerService.java:1111) [org.apache.pulsar-pulsar-broker-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.lambda$asyncOpen$8(ManagedLedgerFactoryImpl.java:425) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) [?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) [?:?] at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl$2.initializeComplete(ManagedLedgerFactoryImpl.java:397) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$3.operationComplete(ManagedLedgerImpl.java:476) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$3.operationComplete(ManagedLedgerImpl.java:466) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at org.apache.bookkeeper.mledger.impl.MetaStoreImpl.lambda$getCursors$8(MetaStoreImpl.java:122) [org.apache.pulsar-managed-ledger-2.7.3.jar:2.7.3] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) [?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) [?:?] at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.60.Final.jar:4.1.60.Final] at java.lang.Thread.run(Thread.java:834) [?:?] ``` ### Modifications Remove the error log stack.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/broker
cherry-picked/branch-2.7
Archived: 2.7 is end of life
cherry-picked/branch-2.8
Archived: 2.8 is end of life
doc-not-needed
Your PR changes do not impact docs
release/2.7.4
release/2.8.1
release/2.9.0
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
Currently, if the
TopicPolicies
isn't initialized completely, the topic gets backlog quota will print the error log stack, this is not necessary, because after the TopicPolicies initialized, the topic level backlog quota will come into effect.Modifications
Remove the error log stack.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)