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

[fix][broker] Fix incorrect unack count when using shared subscription on non-persistent topic #21592

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

1Jack2
Copy link
Contributor

@1Jack2 1Jack2 commented Nov 20, 2023

Fixes #21568

Motivation

Fix incorrect unack count when using shared subscription on non-persistent topic

Modifications

In the case of a non-persistent topic, the consumer does not send an ack to the broker (see org.apache.pulsar.client.impl.NonPersistentAcknowledgmentGroupingTracker# addAcknowledgment)

To work around this, we can update unackedMessages when the broker sends a message to the consumer successfully.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:
1Jack2#5

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 20, 2023
Copy link
Contributor

@Technoboy- Technoboy- left a comment

Choose a reason for hiding this comment

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

Please help check the comment. Better to check if the topic is persistent.

@Technoboy-
Copy link
Contributor

@1Jack2 Thanks

@1Jack2
Copy link
Contributor Author

1Jack2 commented Nov 30, 2023

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

Codecov Report

Merging #21592 (2fd027d) into master (403faa4) will decrease coverage by 0.05%.
Report is 22 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21592      +/-   ##
============================================
- Coverage     73.35%   73.31%   -0.05%     
- Complexity    32711    32726      +15     
============================================
  Files          1892     1892              
  Lines        140707   140709       +2     
  Branches      15483    15496      +13     
============================================
- Hits         103211   103155      -56     
- Misses        29394    29446      +52     
- Partials       8102     8108       +6     
Flag Coverage Δ
inttests 24.12% <33.33%> (-0.13%) ⬇️
systests 24.64% <33.33%> (-0.42%) ⬇️
unittests 72.62% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ava/org/apache/pulsar/broker/service/Consumer.java 86.27% <100.00%> (+0.04%) ⬆️

... and 93 files with indirect coverage changes

@poorbarcode poorbarcode merged commit 7508700 into apache:master Nov 30, 2023
48 checks passed
Technoboy- pushed a commit that referenced this pull request Dec 3, 2023
…n on non-persistent topic (#21592)

Fixes #21568

Motivation
Fix incorrect unack count when using shared subscription on non-persistent topic

Modifications
In the case of a non-persistent topic, the consumer does not send an ack to the broker (see org.apache.pulsar.client.impl.NonPersistentAcknowledgmentGroupingTracker# addAcknowledgment)

To work around this, we can update unackedMessages when the broker sends a message to the consumer successfully.
Technoboy- pushed a commit that referenced this pull request Dec 4, 2023
…n on non-persistent topic (#21592)

Fixes #21568

Motivation
Fix incorrect unack count when using shared subscription on non-persistent topic

Modifications
In the case of a non-persistent topic, the consumer does not send an ack to the broker (see org.apache.pulsar.client.impl.NonPersistentAcknowledgmentGroupingTracker# addAcknowledgment)

To work around this, we can update unackedMessages when the broker sends a message to the consumer successfully.
Technoboy- pushed a commit that referenced this pull request Dec 4, 2023
…n on non-persistent topic (#21592)

Fixes #21568

Motivation
Fix incorrect unack count when using shared subscription on non-persistent topic

Modifications
In the case of a non-persistent topic, the consumer does not send an ack to the broker (see org.apache.pulsar.client.impl.NonPersistentAcknowledgmentGroupingTracker# addAcknowledgment)

To work around this, we can update unackedMessages when the broker sends a message to the consumer successfully.
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 20, 2023
…n on non-persistent topic (apache#21592)

Fixes apache#21568

Motivation
Fix incorrect unack count when using shared subscription on non-persistent topic

Modifications
In the case of a non-persistent topic, the consumer does not send an ack to the broker (see org.apache.pulsar.client.impl.NonPersistentAcknowledgmentGroupingTracker# addAcknowledgment)

To work around this, we can update unackedMessages when the broker sends a message to the consumer successfully.
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 20, 2023
…n on non-persistent topic (apache#21592)

Fixes apache#21568

Motivation
Fix incorrect unack count when using shared subscription on non-persistent topic

Modifications
In the case of a non-persistent topic, the consumer does not send an ack to the broker (see org.apache.pulsar.client.impl.NonPersistentAcknowledgmentGroupingTracker# addAcknowledgment)

To work around this, we can update unackedMessages when the broker sends a message to the consumer successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Unacked message counter is wrong
8 participants