murong00 opened a new pull request #7725:
URL: https://github.com/apache/pulsar/pull/7725
### Motivation
Some user may face the following `Temporary Redirect` issue when the request
topic not owned by the current broker:
```
19:21:48.215 [pulsar-web-42-5] ERROR
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [admin] Failed to
get list of subscriptions for
persistent://default_tenant/default_namespace/default_topic-partition-0
javax.ws.rs.WebApplicationException: HTTP 307 Temporary Redirect
at
org.apache.pulsar.broker.web.PulsarWebResource.validateTopicOwnership(PulsarWebResource.java:599)
at
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.validateReadOperationOnTopic(PersistentTopicsBase.java:245)
at
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalGetSubscriptionsForNonPartitionedTopic(PersistentTopicsBase.java:874)
at
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalGetSubscriptions(PersistentTopicsBase.java:825)
at
org.apache.pulsar.broker.admin.v2.PersistentTopics.getSubscriptions(PersistentTopics.java:461)
09:41:45.485 [pulsar-web-42-7] WARN
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [admin]
[persistent://public/default/test-partition-1] Failed to create subscription
consumer-test at message id -1:-1:-1
javax.ws.rs.WebApplicationException: HTTP 307 Temporary Redirect
at
org.apache.pulsar.broker.web.PulsarWebResource.validateTopicOwnership(PulsarWebResource.java:599)
at
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.validateAdminAccessForSubscriber(PersistentTopicsBase.java:283)
at
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalCreateSubscriptionForNonPartitionedTopic(PersistentTopicsBase.java:1752)
at
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalCreateSubscription(PersistentTopicsBase.java:1673)
at
org.apache.pulsar.broker.admin.v2.PersistentTopics.createSubscription(PersistentTopics.java:816)
```
As discussed in https://github.com/apache/pulsar/issues/7189, it is better
to use debug level when this happens.
### Modifications
Change some `WebApplicationException` log level from error/warn to debug in
`PersistentTopicsBase`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]