lhotari opened a new issue, #25191:
URL: https://github.com/apache/pulsar/issues/25191

   ### Search before reporting
   
   - [x] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Read release policy
   
   - [x] I understand that [unsupported 
versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions)
 don't get bug fixes. I will attempt to reproduce the issue on a supported 
version of Pulsar client and Pulsar broker.
   
   
   ### User environment
   
   All released versions with topic list watcher support
   
   ### Issue Description
   
   Pattern consumers (regex subscriptions) supports topic list watchers after 
[PIP-145](https://github.com/apache/pulsar/issues/14505).
   
   To avoid transporting topic listings when there are no changes, a hash is 
calculated on the client side of the current state and passed to the broker 
side. If the hash matches the current state, the broker responds with an empty 
listing. When change events are sent from the broker to the client, the broker 
adds the hash so that the client can detect whether there's a state drift and a 
reconcilation operation would be needed to synchronize state.
   
   PIP-145 also modified LookupService so that the hash can be passed when 
using the getTopicsUnderNamespace method.
   
   
https://github.com/apache/pulsar/blob/52a4d5ee84fad6af2736376a6fcdd1bc41e7c52f/pulsar-client/src/main/java/org/apache/pulsar/client/impl/LookupService.java#L149-L163
   
   The problem that exist is that the topic listing results in topic list 
watcher uses 
org.apache.pulsar.broker.namespace.NamespaceService#getListOfPersistentTopics 
   and lookup service backend uses 
org.apache.pulsar.broker.namespace.NamespaceService#getListOfUserTopics .
   
   The difference is that getListOfUserTopics filters out system topics:
   
https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L1535-L1537
   
   Due to this difference in original topics used to calculate the hash, it 
won't be helpful at all.
   
   ### Error messages
   
   ```text
   
   ```
   
   ### Reproducing the issue
   
   This problem doesn't cause an actual impact in currently released clients 
since the hash of the topic list watcher results is ignored. Resolving this 
issue is relevant for #25188 changes.
   
   ### Additional information
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to