oneby-wang opened a new pull request, #24698:
URL: https://github.com/apache/pulsar/pull/24698

   ### Motivation
   
   In PatternMultiTopicsConsumerImpl, if watcherFuture is not done, the 
closeAsync() method will not close TopicListWatcher.
   [<!-- Explain here the context, and why you're making that change. What is 
the problem you're trying to solve. -->
   
](https://github.com/apache/pulsar/blob/2e6a8eb1f200ca687064058a101963713b896fe2/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PatternMultiTopicsConsumerImpl.java#L388-L395)
   
   ### Modifications
   
   Re-write the closeAsync() method to make sure TopicListWatcher is closed. 
See file changes, it is ok to throw an Exception when closing a 
TopicListWatcher, because exceptions will be caught by ConsumerBase.close() 
method.
   
https://github.com/apache/pulsar/blob/2e6a8eb1f200ca687064058a101963713b896fe2/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java#L746-L756
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, see 
PatternMultiTopicsConsumerImplTest.
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   


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