ruanwenjun opened a new issue, #16816: URL: https://github.com/apache/dolphinscheduler/issues/16816
### Search before asking - [X] I had searched in the [DSIP](https://github.com/apache/dolphinscheduler/issues/14102) and found no similar DSIP. ### Motivation I sometimes find the scheduler might be duplicate triggered.  This might happen when `ProcessScheduleTask` has a bad performance or the isolation levels is incorrect or we use incorrect quartz parameters. The said thing is that we don't have any metrics to monitor whether there exist duplicate fired. ### Design Detail Add a new table `t_ds_schedule_instance` to record the scheduler fired instance. ```java CREATE TABLE `t_ds_schedule_instance` ( `id` int NOT NULL AUTO_INCREMENT COMMENT 'key', `schedule_id` int NOT NULL, `workflow_instance_id` int NOT NULL, `expect_fire_time` bigint NOT NULL, `actual_fire_time` bigint NOT NULL, `create_time` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_t_ds_schedule_si_eft` (`schedule_id`,`expect_fire_time`) ) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb3 ``` Each record in this table represend a success fired of quartz. Once the scheduler triggered success we will insert a `ScheduleInstance`, if there exist duplicate record will throw exception from db. ### Compatibility, Deprecation, and Migration Plan Compatibility with previous version, since the table is newly created. ### Test Plan Test by IT. ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
