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

   Fixes https://github.com/apache/pulsar/issues/24879
   
   ### Motivation
   
   Partitioned-topic auto deletion call chain:  
   1. gc process(invoked on broker0)
   2. delete partitioned-topic admin api(invoked on broker0)
   3. delete topic-partition-0 admin api(invoked on broker0)
   
   If brokerClient's ·maxConnection· is 1, then broker0 wait itself to release 
the connection, the result is timeout. So we check topic-partition-0 existence 
first to avoid connection pool deadlock.
   
   ### Modifications
   
   When calling delete partitioned-topic admin api, first check topic 
partitions existence to avoid calling delete topic admin api by broker itself 
again, which would help partitioned-topic auto deletion in gc process.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as *(please describe 
tests)*.
   
   `InactiveTopicDeleteTest#testWhenSubPartitionNotDelete()` test method.
   
   
https://github.com/apache/pulsar/blob/1ca17972459095278e2b5f7ed7fd55c8921d8826/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/InactiveTopicDeleteTest.java#L113-L136
   
   But the default `connectionsPerBroker` is 16, which can not reproduce the 
problem.
   
   
https://github.com/apache/pulsar/blob/1ca17972459095278e2b5f7ed7fd55c8921d8826/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/PulsarAdminBuilderImpl.java#L48-L51
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- 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 -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: https://github.com/oneby-wang/pulsar/pull/8
   


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