Shoothzj opened a new issue #12239:
URL: https://github.com/apache/pulsar/issues/12239


   **Describe the bug**
   Concurrent request `delete subscription` A and `delete topic` B will lead to 
leak `ManagerLedgerImpl`、`ManagerCursorImpl`、and any object related to them 
leak.
   That's the work flow
   
   ### Step1 
   A delete the cursor `ledger.asyncDeleteCursor`, but don't remove the 
`subscription` from `ConcurrentOpenHashMap<String, PersistentSubscription> 
subscriptions;`
   ### Step2
   Second, B delete the topic, as long as the `subscription` in 
`subscriptions`, B try to delete the cursor. Because of the `cursor` already 
been delete in `Step1`, delete topic failed
   ### Step3
   A remove the `subscrption` from `subscriptions`
   
   That lead to memory leak, can't free  
`ManagerLedgerImpl`、`ManagerCursorImpl`、and any object related to them.
   
   
   
   
   


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