baomingyu commented on pull request #11965:
URL: https://github.com/apache/pulsar/pull/11965#issuecomment-919659506


   > @baomingyu Nice catch, could you point me where is the `Ack message will 
hold PersistentSubscription(synchronized lock )`? The acknowledgeMessage() 
method
   > 
   > 
https://github.com/apache/pulsar/blob/0584628cc1968f6b50110d8596d3828d0181db2b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java#L357
   > 
   > in the PersistentSubscription will not hold the lock.
   
   for one way : ack message  --> asyncDelete (in ManagedCursorImpl ---get 
write lock) ---> then callback will try to get synchronized lock of 
PersistentStickyKeyDispatcherMultipleConsumers.  Same time , other Thread Ack 
message when individualDeletedMessages is not empty maybe hold 
PersistentStickyKeyDispatcherMultipleConsumers(synchronized) to try get 
ManagedCursorImpl(lock) for read more entries. deadlock will happen.


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