elephone-184 opened a new pull request, #4975:
URL: https://github.com/apache/rocketmq-dashboard/pull/4975

   ## What is the purpose of the change
   
   In clustered deployments of RocketMQ, brokers often suffer configuration 
drift over time due to localized manual restarts, incomplete orchestration 
rollouts, or divergent default flags (such as `flushDiskType`, 
`autoCreateTopicEnable`, `maxMessageSize`, and `brokerPermission`). Such 
divergence introduces subtle failure modes, including broken replication 
durability, uneven storage retention, and intermittent message rejection.
   
   This PR introduces an automated `BrokerConfigDriftEngine` and configuration 
audit report:
   1. `BrokerConfigAuditReportVO`: Domain report capturing 
`clusterConsistencyScore` (0.0 to 100.0), drifted property summaries, 
per-broker actual values, and operational recommendations.
   2. `BrokerConfigDriftEngine`: Evaluates live runtime properties retrieved 
from all reachable brokers in a cluster, identifies deviations against a 
selected cluster baseline, classifies severity (`CRITICAL`, `HIGH`, `MEDIUM`), 
and computes consistency health score.
   3. Controller & Service wiring: Integrates through 
`BrokerConfigDiffService.auditClusterConfigDrift` and exposes 
`/api/clusters/{id}/config-drift-audit` in `ClusterController`.
   4. Comprehensive unit test suite covering synchronized clusters, critical 
divergence (e.g. SYNC vs ASYNC flush), single broker clusters, and 
controller/service integration.
   
   ## Brief changelog
   
   - Add `BrokerConfigAuditReportVO.java` domain model.
   - Add `BrokerConfigDriftEngine.java` audit evaluation logic.
   - Add `auditClusterConfigDrift` method in `BrokerConfigDiffService`.
   - Expose `/api/clusters/{id}/config-drift-audit` endpoint in 
`ClusterController`.
   - Add `BrokerConfigDriftEngineTest.java` and expand 
`BrokerConfigDiffServiceTest.java` and `ClusterControllerTest.java`.
   
   ## Verifying this change
   
   - `BrokerConfigDriftEngineTest`: verifies empty configs, single broker 
baseline, synchronized cluster score 100%, and multi-property drift detection.
   - `BrokerConfigDiffServiceTest`: verifies cluster retrieval, live broker 
property aggregation, and delegation.
   - `ClusterControllerTest`: verifies `/api/clusters/{id}/config-drift-audit` 
HTTP endpoint response mapping.


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