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

   
   Closes #7359 
   
   Topic message queries guard their scan with several budgets (tail scan 
window, pull-attempt cap, null pull, stalled offset, repeated OFFSET_ILLEGAL), 
but every guarded stop only logged and the result was wrapped in 
`MessageQueryResult.complete(...)`, so `resultMayBeTruncated` was always false. 
`MessageService`'s `size() >= 200` fallback cannot catch this: the tail-budget 
clamp routinely stops below 200 rows.
   
   `queryByTopic` now returns `MessageQueryResult` via a new 
`scanTopicMessages` helper (same shape as 
`RocketMQDLQProvider#scanDeadLetters`) and marks `mayBeTruncated` when:
   
   - the tail scan budget clamped a queue's window to offsets it will not read;
   - a queue scan stopped before its planned end (pull budget exhausted, null 
pull result, stalled offset, or repeated OFFSET_ILLEGAL);
   - the newest-N result budget dropped older candidates (mirrors the 
`queryByKey` budget rule).
   
   Deliberately complete: empty queue sets, %RETRY% read-block degradation, and 
TOPIC_NOT_EXIST/NO_MESSAGE. The wire contract is unchanged — 
`resultMayBeTruncated` already flows to the message page warning and the AI 
tool output.
   
   Tests: 7 new cases in `RocketMQMessageProviderTest` covering each guarded 
stop plus a fully-scanned-window guard.
   


-- 
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