Aias00 opened a new issue, #7220: URL: https://github.com/apache/rocketmq-dashboard/issues/7220
### Before Creating the Bug Report - [x] Searched existing issues and PRs; server bulk-rule transaction atomicity is not covered by frontend bulk-delete reporting/pagination or notification retry issues. - [x] This is a Studio defect. ### Studio Version `rocketmq-studio` at `127c47b06a268cc74224d5f34c56ec7c36ac0d55`, built from source. ### Runtime Environment macOS, JDK 21; H2 development datasource for regression testing. No browser or live broker required. ### Connected RocketMQ Cluster Not required: this affects Studio database mutations. ### Describe the Bug All four `AlertService` bulk toggle/delete overloads run one outer transaction and catch each item's RuntimeException. If runtime-state cleanup fails after updating/deleting a rule, the item is reported as failed but its primary mutation can still commit. A rollback-only failure can instead invalidate otherwise successful items. ### Steps to Reproduce 1. Persist two enabled alert rules and runtime state for each. 2. Inject a RuntimeException from `AlertStateRepository.deleteByRuleId` after performing cleanup for the first rule. 3. Invoke bulk disable or bulk delete with both IDs (domain-scoped and unscoped overloads). 4. Inspect the result and persisted rule/state rows after the method returns. ### What Did You Expect to See? Each failed item leaves its rule and state unchanged; other items commit independently. Only committed items appear in succeededIds/updatedRules. ### What Did You See Instead? The failed item's rule mutation and state cleanup can commit despite its failure entry, because the exception is caught inside the batch transaction. ### Additional Context The fix should put each rule mutation, state cleanup and audit operation in an independent transaction, catching failures outside that transaction. This preserves the existing best-effort bulk API contract. ### Are You Willing to Submit a Pull Request? - [x] Yes -- 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]
