Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid incrementing unack-msg count for non-shared sub and not show it on stats #376

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

rdhabalia
Copy link
Contributor

Motivation

Addressing #369

Modifications

  • skip increment of unackedMessages counter for non-shared subscription consumer
  • skip showing it in stats

Result

No functional change.

@rdhabalia rdhabalia added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 21, 2017
@rdhabalia rdhabalia added this to the 1.18 milestone Apr 21, 2017
@rdhabalia rdhabalia self-assigned this Apr 21, 2017
Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@merlimat merlimat merged commit f13606e into apache:master Apr 24, 2017
@rdhabalia rdhabalia deleted the ex_stat branch June 21, 2017 18:51
hrsakai pushed a commit to hrsakai/pulsar that referenced this pull request Dec 10, 2020
Fixes apache#366

### Motivation

In current code of `pulsar/internal/connection.go` we have 2 channels, closeCh and incomingRequestsCh. when the connection closes, the current mis-use of these 2 channels may have a deadlock. 
PR apache#366 has detailed steps to reproduce and the root cause [analysis](apache/pulsar-client-go#366 (comment)) .
This PR tries to fix the deadlock.

### Modifications
- make the close logic independent, not in the same loop of normal events handling.
- when the connection closed, handle the existing requests in the channel and return an error to avoid deadlock.

### Verifying this change
passed the tests in apache#366 
current ut passed
hangc0276 pushed a commit to hangc0276/pulsar that referenced this pull request May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants