You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/15 03:00:51 UTC

[GitHub] [pulsar] baomingyu commented on pull request #11965: fix issues 11964, deadlock bug when use key_shared mode

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org