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] Subscription stuck due to called Admin API analyzeSubscriptionBacklog #22019

Merged

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Feb 4, 2024

Motivation

The Admin API analyzeSubscriptionBacklog will create an OpReadEntry and trigger a read, which leads Managecursor.readPosition to move forward. It makes the subscription stuck(just like the consumer receives messages but does not acknowledge them).

Modifications

  • Substitute new non-durable cursor for subscription.cursor
  • Rename the param startCursorPosition of new NonDurableCursor to mdPosition, make the code more clearer

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode self-assigned this Feb 4, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 4, 2024
@poorbarcode poorbarcode added release/3.0.3 release/2.11.4 release/3.1.3 release/3.2.1 type/bug The PR fixed a bug or issue reported a bug category/reliability The function does not work properly in certain specific environments or failures. e.g. data lost labels Feb 4, 2024
@poorbarcode poorbarcode added this to the 3.3.0 milestone Feb 4, 2024
@poorbarcode poorbarcode closed this Feb 4, 2024
@poorbarcode poorbarcode reopened this Feb 4, 2024
@poorbarcode
Copy link
Contributor Author

poorbarcode commented Feb 4, 2024

A new update: The new Non-Durable cursor has not copied the ack state when creating, I will fix it tomorrow.

New update(2024-02-05): fixed

@poorbarcode poorbarcode requested review from Technoboy- and codelipenghui and removed request for codelipenghui February 5, 2024 02:13
@codecov-commenter
Copy link

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (fce0717) 72.90% compared to head (bd9869c) 73.56%.
Report is 21 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22019      +/-   ##
============================================
+ Coverage     72.90%   73.56%   +0.66%     
- Complexity    32464    32559      +95     
============================================
  Files          1850     1874      +24     
  Lines        138611   139253     +642     
  Branches      15201    15263      +62     
============================================
+ Hits         101052   102444    +1392     
+ Misses        29711    28888     -823     
- Partials       7848     7921      +73     
Flag Coverage Δ
inttests 24.63% <0.00%> (?)
systests 24.32% <0.00%> (?)
unittests 72.85% <64.70%> (-0.05%) ⬇️

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

Files Coverage Δ
...lsar/common/util/collections/BitSetRecyclable.java 46.01% <0.00%> (-0.13%) ⬇️
...ker/service/persistent/PersistentSubscription.java 76.54% <70.58%> (-0.37%) ⬇️
...che/bookkeeper/mledger/impl/ManagedCursorImpl.java 78.84% <62.50%> (-0.61%) ⬇️

... and 202 files with indirect coverage changes

@dao-jun dao-jun merged commit 825e997 into apache:master Feb 18, 2024
51 checks passed
Technoboy- pushed a commit that referenced this pull request Feb 20, 2024
Technoboy- pushed a commit that referenced this pull request Feb 22, 2024
Technoboy- pushed a commit that referenced this pull request Feb 27, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 1, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/reliability The function does not work properly in certain specific environments or failures. e.g. data lost cherry-picked/branch-3.0 cherry-picked/branch-3.1 cherry-picked/branch-3.2 doc-not-needed Your PR changes do not impact docs ready-to-test release/2.11.5 release/3.0.3 release/3.1.3 release/3.2.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants