RockteMQ-AI commented on issue #4783: URL: https://github.com/apache/rocketmq-dashboard/issues/4783#issuecomment-5765183047
## Evaluation **Classification:** Bug — MyBatis-Plus NOT_NULL update strategy prevents clearing optional fields **Severity:** MEDIUM-HIGH **Status:** ✅ Confirmed ### Verification Code references verified against `rocketmq-studio @ 4c697f07`: - `MybatisPlusAlertRepository.replaceRule` (lines 141-146): `ruleMapper.updateById(toRuleEntity(rule))` — MyBatis-Plus default `NOT_NULL` strategy omits null fields from the UPDATE SET clause. - `AlertService.updateRule` (lines 190-223): validates, replaces, then returns the **submitted** VO — API response shows cleared fields, but the database retains stale values. - Precedent: `NameserverRegistryService.clearOmittedOptionalColumns` (#4466) and `MybatisPlusInstanceRepository` (lines 128-131) already work around this exact MyBatis-Plus behavior for other paths. The alert-rule path is the remaining gap. ### Impact - Scope filters (`consumerGroup`, `topic`, `brokerName`, `clusterName`, `instanceId`) cannot be cleared via the update API — alerts keep evaluating against a stale narrower scope. - `severity`/`duration`/`channels`/`notificationTemplate`/`description` also cannot be cleared. - The API response lies: it reports the field as cleared while the database retains the old value. ### Cluster Context This is the same MyBatis-Plus `NOT_NULL` defect class as #4272 (topic remark), #4273 (admin credential, HIGH security), #4274 (NameServer fields). The alert-rule path is another instance. ### Associated PR PR #4784 (by @unbridled-41) — fix: persist cleared optional columns when an alert-rule update omits them. --- *Evaluated by github-manager bot* -- 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]
