-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Fix the dispatcher() stuck caused by availablePermitsCh (#875)
### Motivation The `availablePermitsCh` may cause the dispatcher stuck. https://github.com/apache/pulsar-client-go/blob/0b0720ab73d7f6378b8b6ac37acbafe547c268c8/pulsar/consumer_partition.go#L1096-L1109 For example, if `messageCh <- nextMessage` continueously selected 10 times, the `availablePermitsCh` will be filled. The next `messageCh <- nextMessage` will be stuck forever because `pr := <-pc.availablePermitsCh` can never be reached. ### Modifications Remove the `pc.availablePermitsCh` from dispatcher.
- Loading branch information
1 parent
0b0720a
commit 5679f1f
Showing
1 changed file
with
40 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters