X-LightYear opened a new issue, #5131:
URL: https://github.com/apache/rocketmq-dashboard/issues/5131
## Description
The `rocketmq-studio` development profile uses H2 in MySQL compatibility
mode, but metric snapshot persistence generates an unquoted `value` column
name. H2 treats `VALUE` as a reserved keyword, so native metric collection
cannot persist snapshots in the development profile.
## Reproduction
1. Check out the current `rocketmq-studio` development trunk.
2. Start the server with the `dev` profile.
3. Let `CollectorScheduler` persist a metric snapshot, or run the following
deterministic test path:
`MetricSnapshotRepository.saveAll(List.of(...))`.
4. Use H2 2.4.240 with the repository schema.
## Actual behavior
The insert fails with `JdbcSQLSyntaxErrorException [42001-240]` at the
unquoted `value` column. Metric snapshot collection logs a persistence error
and the snapshot is not stored.
## Expected behavior
The development H2 profile should persist and read metric snapshots
successfully, including batch writes.
## Root cause
`RmqMetricSnapshot.value` has no explicit MyBatis-Plus column mapping, so
generated SQL uses `value` without quoting even though the shared schema
defines the column as `` `value` ``.
## Scope
The minimal fix is to quote only the `value` field mapping in
`RmqMetricSnapshot`; no schema or metric collection behavior changes are
required.
--
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]