[ISSUE #10941] Retain receipt handles when cleanup submission is rejected - #10942
[ISSUE #10941] Retain receipt handles when cleanup submission is rejected#10942Aias00 wants to merge 1 commit into
Conversation
Signed-off-by: liuhy <liuhongyu@apache.org>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10942 +/- ##
=============================================
- Coverage 48.62% 48.50% -0.13%
+ Complexity 13692 13653 -39
=============================================
Files 1381 1381
Lines 101464 101469 +5
Branches 13187 13188 +1
=============================================
- Hits 49337 49217 -120
- Misses 46142 46240 +98
- Partials 5985 6012 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Solid fix for preventing receipt handle loss when the cleanup thread pool rejects the submission.
The change catches RejectedExecutionException when submitting the cleanup task and restores the handle group to the map via putIfAbsent(), ensuring the handles are retained for retry in the next schedule cycle. This prevents data loss under high load when the thread pool queue is full.
The explicit AbortPolicy on the thread pool constructor is good practice — it makes the rejection behavior explicit rather than relying on the default.
Test coverage validates the fix by mocking a scenario where the executor rejects the task and verifying the handles remain in the map.
LGTM.
Automated review by github-manager-bot
|
Superseded by #10934, which now contains both asynchronous cleanup-failure and task-submission-rejection handling plus their regression tests. |
What does this PR do?
Prevents offline receipt-handle cleanup from silently losing a removed group when its worker queue cannot accept the task. The cleanup executor now rejects explicitly, and
clearGrouprestores the group for the next scheduled retry.Test
mvn -pl proxy -Dtest=DefaultReceiptHandleManagerTest testCloses #10941.