Frun1na commented on PR #5283:
URL:
https://github.com/apache/rocketmq-dashboard/pull/5283#issuecomment-6093018698
Thanks for the review. All four points are addressed in 37bf0a95 (on top of
a rebase onto `7e7aa344`):
- **500 instead of 502.** The unreadable snapshot now raises
`BusinessException(500, ...)`, and the integration test asserts 500.
- **Write side.** `buildResultSnapshot` no longer returns `null` on
`JsonProcessingException`; it throws `IllegalStateException`.
`MessageService.recordMessageQuery` already wraps the history write in a
`RuntimeException` guard, so the failure is logged and the row is skipped: no
row can advertise N results with a null snapshot any more, and the query result
itself is returned unchanged. I kept "blank = empty" on the read side rather
than also treating "blank snapshot with `resultCount > 0`" as a failure,
because rows written before snapshots existed (#2839) legitimately have that
shape. Two new tests cover it:
`QueryHistoryServiceTest.unwritableResultSnapshotIsReportedInsteadOfStoredAsNullTest`
and
`MessageServiceTest.skipsTheHistoryRowWhoseResultSnapshotCannotBeWrittenTest`,
which uses a real `QueryHistoryService` whose mapper cannot write. Both fail
with the write-side change reverted (`Expecting code to raise a throwable` /
`NeverWantedButInvoked: rmqMessageQueryMapper.insert`
).
- **Impact statement.** Corrected: `getMessageQueryResults` has no frontend
caller, so the description now names the `GET
/api/query-history/messages/{id}/results` API and the history list's result
count instead of a web view.
The test log in the description was rerun against MySQL 8 with the CI schema.
--
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]