Aias00 opened a new pull request, #2673: URL: https://github.com/apache/rocketmq-dashboard/pull/2673
## Summary Closes #2664. This PR keeps the legacy full-list alert silence endpoint for compatibility, then adds a bounded paginated inventory endpoint and moves notification-time silence matching away from full-table reads. ## Changes - Add `GET /api/alert-silences/page` returning `PageResult<AlertSilenceVO>` with `page`/`pageSize` validation. - Add repository pagination with stable `ends_at DESC, id DESC` ordering. - Query active silence candidates in SQL by time window plus wildcard-compatible domain/rule/instance scope before preserving existing label matching in memory. - Add `idx_alert_silence_active_scope` to fresh schema and startup migration so existing databases can add the hot-path index idempotently. - Cover controller, service, repository query contract, and schema migration behavior. ## Compatibility - Existing `GET /api/alert-silences` remains available for current callers. - Wildcard domain/rule/instance semantics are preserved. - Overlapping matching windows still suppress delivery until the latest matching `ends_at`. ## Verification - RED: `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -Dtest=AlertSilenceServiceTest,MybatisPlusAlertSilenceRepositoryTest,AlertSilenceControllerTest test` failed before implementation with missing `listPage/findPage/findActiveCandidates` symbols. - `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -Dtest=AlertSilenceServiceTest,MybatisPlusAlertSilenceRepositoryTest,AlertSilenceControllerTest,AlertSchemaMigrationTest test` - `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -Dtest=AlertSilenceControllerTest,MybatisPlusAlertRepositoryTest,AlertRuleControllerTest,AlertServiceDefaultRulesTest,AlertRuleDurationTest,AlertNotificationSuppressionServiceTest,AlertRuleAssetControllerTest,MybatisPlusAlertSilenceRepositoryTest,ClusterAlertRuleControllerTest,AlertStateMachineTest,AlertFingerprintTest,NativeAlertProcessorTest,AlertRuleTransferServiceTest,AlertRuleEvaluatorTest,AlertRuleAssetServiceTest,AlertSchemaMigrationTest,NativeAlertRuleTestServiceTest,AlertRuleRequestDTOTest,AlertServiceTest,NotificationOutboxServiceTest,AlertRuleSemanticFingerprintTest,NativeAlertRulePolicyTest,AlertSilenceServiceTest,SystemAlertControllerTest,MybatisPlusAlertStateRepositoryTest,AlertNotificationTemplateTest,NativeAlertMetricCatalogServiceTest,NativeAlertRuleScopeMatcherTest test` - `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -DskipTests package` -- 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]
