Skip to content

[fix][broker] Fix unack count when mixing non batch index and batch index acks - #21126

Merged
Technoboy- merged 1 commit into
apache:masterfrom
erobot:fix-unack-count
Sep 11, 2023
Merged

Technoboy- merged 1 commit into
apache:masterfrom
erobot:fix-unack-count

Conversation

@erobot

@erobot erobot commented Sep 5, 2023

Copy link
Copy Markdown
Contributor

Motivation

Unack count is wrong when mixing non batch index and batch index acks in one CommandAck.

Modifications

Check ack type for every MessageIdData.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added test testMixIndexAndNonIndexUnAckMessageCount

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: erobot#3

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 5, 2023
@Technoboy- Technoboy- closed this Sep 7, 2023
@Technoboy- Technoboy- reopened this Sep 7, 2023
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #21126 (e3f98e2) into master (b26ee8a) will decrease coverage by 2.99%.
Report is 12 commits behind head on master.
The diff coverage is 14.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21126      +/-   ##
============================================
- Coverage     33.46%   30.47%   -2.99%     
+ Complexity    12179      301   -11878     
============================================
  Files          1623     1696      +73     
  Lines        127399   131101    +3702     
  Branches      13929    14499     +570     
============================================
- Hits          42631    39950    -2681     
- Misses        79158    85181    +6023     
- Partials       5610     5970     +360     
Flag Coverage Δ
inttests 24.26% <14.81%> (+0.18%) ⬆️
systests 25.38% <14.81%> (?)
unittests ?

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

Files Changed Coverage Δ
...areness/IsolatedBookieEnsemblePlacementPolicy.java 0.00% <0.00%> (ø)
...ava/org/apache/pulsar/broker/service/Consumer.java 51.63% <0.00%> (-10.18%) ⬇️
...he/pulsar/functions/utils/FunctionConfigUtils.java 46.02% <0.00%> (+28.61%) ⬆️
...impl/PersistentAcknowledgmentsGroupingTracker.java 47.71% <57.14%> (-3.63%) ⬇️

... and 681 files with indirect coverage changes

@shibd

shibd commented Oct 22, 2023

Copy link
Copy Markdown
Member

@erobot hi, Can you help create a PR to cherry-pick this change to branch-2.11?

shibd pushed a commit to shibd/pulsar that referenced this pull request Oct 25, 2023
@erobot
erobot deleted the fix-unack-count branch October 31, 2023 06:39
nodece pushed a commit that referenced this pull request Jul 22, 2024
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Jul 24, 2024
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.

8 participants