[ISSUE #10806] Log proxy remoting cleanup failures - #10807
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Proxy remoting expired-request queue cleanup to avoid silently swallowing unexpected failures by logging a warning with compact queue context and breaking out of the current cleanup pass. It also adds a regression test to ensure the cleanup does not spin when queue access fails.
Changes:
- Log unexpected exceptions during
cleanExpiredRequestInQueuewith queue size context and stop the current cleanup pass. - Add
safeQueueSize(...)helper to safely obtain queue size for logging. - Add a regression unit test covering queue access failure behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java |
Logs cleanup failures with queue context and breaks the cleanup loop to prevent silent churn. |
proxy/src/test/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServerTest.java |
Adds regression coverage ensuring cleanup stops promptly when getQueue() throws. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10807 +/- ##
=============================================
- Coverage 48.62% 48.51% -0.12%
+ Complexity 13692 13656 -36
=============================================
Files 1381 1381
Lines 101464 101473 +9
Branches 13187 13188 +1
=============================================
- Hits 49337 49228 -109
- Misses 46142 46235 +93
- Partials 5985 6010 +25 ☔ 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
Replaces silent catch (Throwable ignored) blocks with proper warning-level logging in proxy remoting cleanup paths. This improves debuggability for connection lifecycle issues without changing behavior. Good test coverage verifying both success and failure logging.
LGTM.
Automated review by github-manager-bot
🤖 Automated Review by RockteMQ-AIPR Review: #10807🔴 CriticalNone. 🟡 Warning
🟢 Suggestion
Automated review. Please verify findings before acting on them. |
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Defensive fix with proper validation and test coverage. LGTM.
Automated review by github-manager-bot
1536de3 to
70d707f
Compare
Summary
Tests
Closes #10806