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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4524
   
   ### Brief Description
   
   Apache message-ID queries could convert lookup errors into an empty result. 
The primary lookup recorded the error, the decoded-offset fallback also reduced 
errors to a null result, and the provider then returned an empty list.
   
   This change keeps the existing fallback behavior while distinguishing a 
known absent message from an operational lookup error. Known no-message 
response codes stay empty results, broker-topology rejection remains unchanged, 
and a successful decoded-offset fallback still rescues a failed primary lookup. 
When all applicable lookup paths fail operationally, Studio now returns a 
502-style `BusinessException` rather than `0 messages`.
   
   The trace-timestamp path stays best-effort and keeps its existing one-hour 
fallback window.
   ### Red / Green Verification
   
   Baseline: `master@987b748e8f4f421c5cd3c4c4e51a064cc7e59f18`.
   
   Fail-before, Java 21:
   - Added a regression where `viewMessage("TopicA", "uniq-key-failure")` 
throws `IllegalStateException("nameserver unavailable")`.
   - `RocketMQMessageProviderTest`: **55 tests, exactly 1 failure**.
   - The new test failed with `Expecting code to raise a throwable`, proving 
current master returned empty instead of surfacing the lookup failure.
   
   Green, Java 21:
   - `RocketMQMessageProviderTest`: **56/56 passed**.
   - 
`RocketMQMessageProviderTest,MessageServiceTest,MessageControllerTest,MessageQueryToolHandlerTest`:
 **87/87 passed**.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**.
   - `git diff --check`: clean.
   ### Compatibility / Risk
   
   No API, schema, dependency, or frontend changes. Known absent-message 
outcomes remain empty; the existing offset-id topology boundary is unchanged; 
successful fallback lookup behavior is preserved. Only operational lookup 
failures that were previously reported as confirmed empty now surface as errors.
   
   AI-assisted source 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