mattisonchao opened a new pull request #14940:
URL: https://github.com/apache/pulsar/pull/14940


   ### Motivation
   
   - When ``TransactionMetadataStoreService#handleTcClientConnect`` invoke 
method as bellow we omit exception.
   
   ```java
   pulsarService.getBrokerService().checkTopicNsOwnership(TopicName
                           .TRANSACTION_COORDINATOR_ASSIGN.getPartition((int) 
tcId.getId()).toString()).thenRun(() -> {
                                 //.... omit some code
                            })
   ```
   
   - Avoid frequent context switching using thread pools.
   
   ### Modifications
   
   - Make ``checkTopicNsOwnership`` future return.
   - Use ``thenComposeAsync`` to avoid context switching.
   - Refactor some code.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   ### Documentation
   
   - [x] `no-need-doc` 
   
   
   


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