poorbarcode opened a new pull request, #17524:
URL: https://github.com/apache/pulsar/pull/17524

   ### Motivation
   
   In the original design, a persistent topic can be closed in two ways:
   
   - `persistentTopic.close()` will completed after `client resources close`, 
`policy close` and `managed ledger close`.
   - `persistentTopic.close(true)` will completed after `policy close` and 
`managed ledger close`, but not wait for `client resources close`
   
   When close is executing, will check the status `isClosingOrDeleting` to 
prevent concurrency, but the status `isClosingOrDeleting` check does not work 
properly.
   
   <strong>(High light)</strong>After executing `persistentTopic.close()`, 
`persistentTopic.close(true)` can still be executed. see the code below(High 
light line: L1266): 
   
   
https://github.com/apache/pulsar/blob/eab2bb5fe089217d39a71965526729a3d93b74b6/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L1259-L1275
   
   ### Modifications
   
   Make `close` can not be executed multiple times concurrently.
   
   ### Documentation
   
   - [ ] `doc-required` 
     
   - [ ] `doc-not-needed` 
     
   - [ ] `doc` 
   
   - [ ] `doc-complete`


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