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 2020/06/07 19:42:13 UTC
[GitHub] [pulsar] BewareMyPower commented on issue #7168: regex subscription not working for new topics in Python
BewareMyPower commented on issue #7168:
URL: https://github.com/apache/pulsar/issues/7168#issuecomment-640269322
TL;DR It's because there's a deadlock in C++ client. I'll push a PR soon.
Just because C++ stand library doesn't have something like `ConcurrentHashMap`, the current implementation used a `mutex_` to share a `std::map`.
However, the `mutex_` is also acquired in `receive`, so if you called `receive`, the `mutex_` is acquired and held until a new message was pushed to the internal message queue. Then if the topic discovery timer found new topics, the callback to add new topics also needed to acquire the `mutex_`, which leads to a deadlock.
The deadlock problem is similar to my PR before, see the change of `PartitionedConsumerImpl::receive` in #6732.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org