pilichoumao opened a new pull request, #6312: URL: https://github.com/apache/rocketmq-dashboard/pull/6312
Fixes #6311 An evaluation can retain a rule fetched before a management transaction disables/deletes it or changes its conditions. After management purges the runtime state, the old evaluation can recreate a FIRING state, event, and notification outbox row. Missing-state reconciliation has the same stale-rule window. Take a current `SELECT ... FOR UPDATE` rule read inside the existing evaluation/reconciliation transaction before lifecycle writes. Skip missing/disabled rules or changed evaluation semantics; otherwise use current presentation/notification metadata. The lock serializes writes with the existing rule management UPDATE/DELETE and stays held until lifecycle writes commit or roll back. No schema, REST API, dependency, or delivery behavior changes. Add six real-database concurrency regressions covering disable/delete/condition changes committed before evaluation, presentation-only edits, management waiting for an already locked evaluation, and stale missing-state reconciliation. The tests establish separate database connections and an MVCC snapshot, rather than relying only on mocks. Update the native-alerting design notes and existing mocks. Validation (Java 21, one build/test process at a time, 512 MiB heap per JVM): - Full backend suite against local MySQL 8 plus the existing dev/H2 profiles: 3440 tests, 0 failures, 0 errors, 3 skipped. No tests excluded or automatically retried. - Focused suite against MySQL: 138 tests pass; the final full run also includes the strengthened MVCC snapshot assertions. - Focused suite against dev/H2: 138 tests pass, including all six concurrency regressions. - Checkstyle/architecture checks and `git diff --check` pass. - Packaging reaches the existing binary license gate and fails on the exact same set of 164 missing upstream LICENSE/COPYING files as base `5e4c39b053c35a5598cc79ff331b8a54e649d7b1`. No license gate bypass. Initial full runs with an artificially constrained single-CPU JVM exposed an existing shutdown test's virtual-thread scheduling issue (also reproduced on the unchanged backend baseline) and a separate H2 concurrent migration error. The final full run uses two CPUs with the same 512 MiB heap cap; both pass without changing these unrelated modules. This checks the currently committed rule; intermediate disable/re-enable or condition changes that return to the original semantics do not introduce a new evaluation epoch. Disabling retains already committed event/delivery history. -- 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]
