Skip to content

when allowAutoTopicCreation=false , resource group limit will fail to start #14935

@leizhiyuan

Description

@leizhiyuan

Describe the bug
A clear and concise description of what the bug is.
https://github.com/apache/pulsar/wiki/PIP-82%3A-Tenant-and-namespace-level-rate-limiting

when allowAutoTopicCreation=false , resource group limit will fail to start

To Reproduce
Steps to reproduce the behavior:

add

resourceUsageTransportClassName=org.apache.pulsar.broker.resourcegroup.ResourceUsageTopicTransportManager

allowAutoTopicCreation=false

then start broker

22:37:17.036 [main] ERROR org.apache.pulsar.PulsarStandaloneStarter - Failed to start pulsar service.
org.apache.pulsar.broker.PulsarServerException: java.lang.reflect.InvocationTargetException
	at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:795) ~[classes/:?]
	at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:301) ~[classes/:?]
	at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:131) [classes/:?]
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_322]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_322]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_322]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_322]
	at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:775) ~[classes/:?]
	... 2 more
Caused by: org.apache.pulsar.client.api.PulsarClientException$TopicDoesNotExistException: {"errorMsg":"Topic non-persistent://pulsar/system/resource-usage does not exist","reqId":2195930858616055387, "remote":"localhost/127.0.0.1:6650", "local":"/127.0.0.1:51894"}
	at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:1066) ~[classes/:?]
	at org.apache.pulsar.client.impl.ReaderBuilderImpl.create(ReaderBuilderImpl.java:77) ~[classes/:?]
	at org.apache.pulsar.broker.resourcegroup.ResourceUsageTopicTransportManager$ResourceUsageReader.<init>(ResourceUsageTopicTransportManager.java:129) ~[classes/:?]
	at org.apache.pulsar.broker.resourcegroup.ResourceUsageTopicTransportManager.<init>(ResourceUsageTopicTransportManager.java:223) ~[classes/:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_322]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_322]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_322]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_322]
	at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:775) ~[classes/:?]

starting broker needs this non-persistent topic exists, but only this broker started ,we can create the non-persistent topic..

dead lock..

Expected behavior

allow users set the topic name, they can use a persistent topic

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

type/bugThe PR fixed a bug or issue reported a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions