Skip to content

[ISSUE #11600] POP consumers occasionally wait for the polling timeout despite available messages - #11601

Open
f1amingo wants to merge 1 commit into
apache:developfrom
f1amingo:fix/pop-longpolling-lost-wakeup
Open

f1amingo wants to merge 1 commit into
apache:developfrom
f1amingo:fix/pop-longpolling-lost-wakeup

Conversation

@f1amingo

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Brief Description

Preserve arrival notifications between the eligibility check and long-polling registration so readable messages do not wait for another arrival or the polling timeout.

  • Attach notification counts to existing polling queues and snapshot before checking eligibility.
  • Retry waiter notification after registration when the count changed, without advancing it during compensation.
  • Cover ordinary/KV POP, Notification, Lite Notification and Lite POP; retain existing non-polling behavior and polling overloads.

Group-wide counting may cause conservative rechecks after notifications from other queues. It also adds cached counting queues and atomic operations. Cache/route eviction and per-waiter fairness guarantees are outside this fix; compensation keeps the existing waiter-selection policy.

How Did You Test This Change?

  • 39 component and polling-service tests passed in 20 consecutive runs on the latest develop baseline.
  • Replacing all three processors with their unmodified develop versions produced exactly the 12 expected assertion failures out of 14 component tests.
  • 89 related broker tests passed through Maven, with no failures, errors or skips; Checkstyle and git diff --check passed.
  • End-to-end throughput and cache-capacity stress tests have not been run.

…timeout despite available messages

- Preserve arrival notifications between the eligibility check and polling registration
- Reuse polling queues for notification counts and compensate without advancing the count
- Add deterministic processor regressions and polling-service coverage
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.54%. Comparing base (becbe78) to head (3582731).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #11601      +/-   ##
=============================================
+ Coverage      50.25%   50.54%   +0.28%     
- Complexity     14609    14723     +114     
=============================================
  Files           1391     1391              
  Lines         103493   103518      +25     
  Branches       13561    13566       +5     
=============================================
+ Hits           52015    52325     +310     
+ Misses         45231    44935     -296     
- Partials        6247     6258      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] POP consumers occasionally wait for the polling timeout despite available messages

2 participants