Loyal-Young opened a new issue, #7101: URL: https://github.com/apache/rocketmq-dashboard/issues/7101
## Problem The Mock alert-rule store assigns `Date.now()` as the ID for each created rule and uses the same timestamp as the first ID in each imported batch. Two creates, an import followed by a create, or two imports within one millisecond can produce duplicate IDs. The Mock update, toggle, and delete paths select the first matching ID, so an action can change the wrong rule; React lists can also receive duplicate keys. ## Reproduction Freeze `Date.now()` at one timestamp, then create two alert rules in the same domain. Both receive the same ID. Deleting either ID removes only the first matching rule. ## Expected behavior Every newly created or imported alert rule gets a distinct numeric ID, even when the clock does not advance. Import should allocate one contiguous block without overlapping existing rules in either Mock domain. ## Proposed fix Allocate IDs above the current Mock inventory maximum, using the current timestamp as a lower bound. Add deterministic tests with a frozen clock for consecutive creates and imports. -- 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]
