question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Topic policies cache have not init" randomly happen on different topics in the same namespace

See original GitHub issue

Describe the bug I think my bug is related to this issue https://github.com/apache/pulsar/issues/10231 but actually it’s not because our Pulsar has disabled the brokerDeleteInactiveTopicsEnabled in broker level. And the issue “Topic policies cache have not init” happened on both namespaces with “inactiveTopicPolicies” enabled and disabled.

We are all using partition topics.

Our full adjusted configs:

allowAutoTopicCreationType=partitioned
brokerDeleteInactivePartitionedTopicMetadataEnabled=true
brokerDeleteInactiveTopicsEnabled=false
clusterName=mycluster
configurationMetadataStoreUrl=zookeeper:2181
forceDeleteNamespaceAllowed=true
forceDeleteTenantAllowed=true
functionsWorkerEnabled=false
managedLedgerDefaultAckQuorum=2
managedLedgerDefaultEnsembleSize=3
managedLedgerDefaultWriteQuorum=3
metadataStoreUrl=zookeeper:2181
numHttpServerThreads=32
numIOThreads=8
systemTopicEnabled=true
topicLevelPoliciesEnabled=true

To Reproduce Steps to reproduce the behavior: I have no idea of how to reproduce this issue but it happens on our production environment and not in staging. May be it’s related to production data

Expected behavior We can set topic policies properly without exception that:

Message: Topic policies cache have not init.

Stacktrace:

org.apache.pulsar.broker.service.BrokerServiceException$TopicPoliciesCacheNotInitException: Topic policies cache have not init.
        at org.apache.pulsar.broker.service.SystemTopicBasedTopicPoliciesService.getTopicPolicies(SystemTopicBasedTopicPoliciesService.java:207)
        at org.apache.pulsar.broker.service.TopicPoliciesService.lambda$getTopicPoliciesAsyncWithRetry$0(TopicPoliciesService.java:100)
        at org.apache.pulsar.client.util.RetryUtil.executeWithRetry(RetryUtil.java:48)
        at org.apache.pulsar.client.util.RetryUtil.lambda$null$1(RetryUtil.java:57)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)

Desktop (please complete the following information):

  • OS: Ubuntu with Pulsar 2.10.0

Additional context Currently is there any Rest API for manually init the Topic Policies Cache or any way to check it via command line and manually init it?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Raven888888commented, Sep 15, 2022

Awesome to hear that @Technoboy- appreciate it Hope to use back topic level policy in the next release.

1reaction
Technoboy-commented, Sep 15, 2022

@Raven888888 @diegosalvi @truong-hua We have found the root cause and pushed out the fix https://github.com/apache/pulsar/pull/17562 Thanks for reporting the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pulsar concepts and architecture
As in other pub-sub systems, topics in Pulsar are named channels for transmitting messages from producers to consumers. Topic names are URLs that...
Read more >
3. Resolved and Known Issues Red Hat JBoss Enterprise ...
An attempt to query the patch status of a JBoss EAP instance could previously result in an IllegalStateException error being thrown.
Read more >
14 Implementing Application Context and Fine-Grained ...
When application context is used as a secure data cache, applications can use ... Those session-based application contexts that are initialized externally ...
Read more >
Configuring Strimzi (0.32.0)
Make sure that any custom ConfigMaps you create do not have the same name as these ... The Kubernetes namespace in which the...
Read more >
Configuring Infinispan caches
Infinispan offers a local cache mode that is similar to a ... or errors that happen on remote nodes are not reported to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found