yyqdbngt opened a new pull request, #2922: URL: https://github.com/apache/rocketmq-dashboard/pull/2922
## Summary - `MybatisPlusMetricSnapshotRepository.toSample()` now returns null (with a warning log) when a persisted snapshot row cannot be materialized: unknown `domain`/`availability` enum values, a NULL value on an available row, or a missing collected timestamp - `findRecent()` filters out those rows instead of letting the `MetricSample` constructor throw - Adds a regression test with a valid row mixed with a NULL-value row and an unknown-domain row ## Why `rmq_metric_snapshot` allows `value` to be NULL, and its `domain`/`availability` columns are plain strings. A structurally invalid row (a legacy enum value from an older Studio version, a NULL value on an AVAILABLE row, or a direct DB edit) made `toSample()` throw an `IllegalArgumentException`/`NullPointerException` that was not caught (only JSON errors were), so one bad record broke the entire recent-samples window read by alert aggregation for that scope — every alert evaluation in the scope failed until the 24h retention cleanup removed the row. ## Testing - `mvn -Dtest=MybatisPlusMetricSnapshotRepositoryTest test` → Tests run: 2, Failures: 0, Errors: 0 (1 new; verified it errors with the pre-fix materialization) -- 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]
