zmuxuny opened a new pull request, #4536:
URL: https://github.com/apache/rocketmq-dashboard/pull/4536

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4535
   
   ### Brief Description
   
   Apache LiteTopic session detail previously converted Broker metric-read 
failures into healthy-looking numeric values. The group backlog helper returned 
`0` after any `getLiteGroupInfo` failure, while per-LiteTopic consumed-offset 
failures were logged and silently skipped.
   
   The session response then published `pendingMessages`, `consumedMessages`, 
`totalMessages`, and consumption progress as if those reads had succeeded.
   
   This change keeps summary/list aggregation best-effort, but makes an 
explicitly requested single session detail fail closed when its backlog or 
consumed-offset RPC fails. A successful response with no committed LiteTopic 
offset wrapper remains a legitimate zero-consumed state.
   ### Red / Green Verification
   
   Baseline: `master@d50ffecc9d7e8f8f46da64198831bd7952e6974e`.
   
   Fail-before, Java 21:
   - Added a session backlog RPC-failure regression.
   - Added a per-LiteTopic consumed-offset RPC-failure regression.
   - `RocketMQLiteTopicProviderTest`: **16 tests, exactly 2 failures**; both 
new tests failed with `Expecting code to raise a throwable` because current 
master returned a normal session.
   
   Green, Java 21:
   - `RocketMQLiteTopicProviderTest`: **18/18 passed**.
   - 
`RocketMQLiteTopicProviderTest,LiteTopicServiceTest,LiteTopicControllerTest,LiteTopicSessionTest`:
 **38/38 passed**.
   - Added protection for a missing backlog body and for the legitimate 
no-committed-offset case.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**.
   - `git diff --check`: clean.
   ### Compatibility / Risk
   
   No API schema, frontend, dependency, or summary-list behavior changes. 
Genuine zero lag remains zero. A null per-LiteTopic offset wrapper remains zero 
consumed because the Broker protocol legitimately omits it when no committed 
offset exists.
   
   Only operational failures while constructing an exact session detail now 
surface as 502 instead of fabricated progress values. Interrupted reads restore 
the thread interrupt flag before failing.
   
   AI-assisted source/protocol audit, implementation and regression authoring; 
fail-before and green verification were executed locally against the stated 
baseline.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to