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 broker identifying incorrect stuck topic #24006

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Feb 20, 2025

Motivation

Currently broker is keep printing false logs by incorrectly finding stuck topic when broker has correctly blocked consumers with max-unack messages. Therefore, stuck consumer check task should not consider topic stuck if all the consumers are blocked due to max-unack messages and there are no available consumers, to avoid below false log lines

22:21:20.187 [pulsar-stats-updater-OrderedScheduler-0-0] WARN  org.apache.pulsar.broker.service.persistent.PersistentDispatcherMultipleConsumers - persistent://tenant1/ns1/t1 / my-sub Dispatcher is stuck and unblocking by issuing reads

Modifications

Stuck topic check task should not consider topic stuck if none of the consumer is available to consume messages.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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:

@rdhabalia rdhabalia added area/broker doc-not-needed Your PR changes do not impact docs ready-to-test labels Feb 20, 2025
@rdhabalia rdhabalia self-assigned this Feb 20, 2025
@github-actions github-actions bot added doc-label-missing and removed doc-not-needed Your PR changes do not impact docs labels Feb 20, 2025
Copy link

@rdhabalia Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.26%. Comparing base (bbc6224) to head (8d0ef5d).
Report is 928 commits behind head on master.

Files with missing lines Patch % Lines
...tent/PersistentDispatcherSingleActiveConsumer.java 0.00% 0 Missing and 2 partials ⚠️
...sistent/PersistentDispatcherMultipleConsumers.java 0.00% 0 Missing and 1 partial ⚠️
.../PersistentDispatcherMultipleConsumersClassic.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24006      +/-   ##
============================================
+ Coverage     73.57%   74.26%   +0.69%     
+ Complexity    32624    32300     -324     
============================================
  Files          1877     1854      -23     
  Lines        139502   143879    +4377     
  Branches      15299    16353    +1054     
============================================
+ Hits         102638   106854    +4216     
+ Misses        28908    28645     -263     
- Partials       7956     8380     +424     
Flag Coverage Δ
inttests 26.73% <0.00%> (+2.14%) ⬆️
systests 23.20% <0.00%> (-1.12%) ⬇️
unittests 73.79% <0.00%> (+0.95%) ⬆️

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

Files with missing lines Coverage Δ
...sistent/PersistentDispatcherMultipleConsumers.java 74.24% <0.00%> (-0.08%) ⬇️
.../PersistentDispatcherMultipleConsumersClassic.java 44.87% <0.00%> (ø)
...tent/PersistentDispatcherSingleActiveConsumer.java 67.35% <0.00%> (-1.57%) ⬇️

... and 1042 files with indirect coverage changes

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Feb 20, 2025
@lhotari lhotari merged commit 28f7845 into apache:master Feb 20, 2025
55 of 57 checks passed
@rdhabalia rdhabalia deleted the stuck_cons_false branch February 20, 2025 18:21
lhotari pushed a commit that referenced this pull request Feb 21, 2025
lhotari pushed a commit that referenced this pull request Feb 21, 2025
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.

3 participants