dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[BUG] multiple browser tab cause cron scheduler trigger duplicate

Open KEN-LJQ opened this issue 6 years ago • 5 comments

Describe the bug We found some workflow will schedule two instance at the same time every day. Because it has set two Quartz Trigger, see the screenshots below image Since we can see that the difference is trigger group, the suffix means project id, so it indicate this workflow belong to difference project, which suppose to be wrong. After review the code, the project id comes from the set-scheduler-online-or-offline request, the value is pass by frontend image

To Reproduce key operations: open two or more tabs, offline and online scheduler Assume we have to project: project-1, project-2, and workflow-A belong to project-1

  1. Open the cron scheduler page of workflow-A
  2. New a tab, and open another workflow of project-2
  3. Refresh the cron scheduler page of workflow-A
  4. Offline scheduler of workflow-A
  5. Online scheduler of workflow-A After these step, the old cron trigger did not remove, but a new one was added, and the trigger group was difference

Which version of Dolphin Scheduler: -[1.1.0]

Additional context Using DolphinScheduler within only one tab can avoid this bug, but it's more convenience for developer if them open one more tab, so this bug may be trigger.

KEN-LJQ avatar Apr 03 '20 06:04 KEN-LJQ

good job

and do you have good idea to solve this problem?

davidzollo avatar Apr 03 '20 07:04 davidzollo

Instead of get the project name from frontend request, an option is get the process_definition_id from t_ds_schedules table record, and then query table t_ds_process_definition to get the project id, finally we can get the project infomation from t_ds_projects. But compare with the original implement, the cost is we have to do one more db query.

KEN-LJQ avatar Apr 07 '20 01:04 KEN-LJQ

@break60 , this is front-end problem, please fix , 1.2.0 also exists this problem

davidzollo avatar Apr 09 '20 09:04 davidzollo

Your problem has been fixed in 1.2.1

break60 avatar Apr 09 '20 09:04 break60

I just learned that this also has been fixed in the dev branch, next version will also solved this problem

davidzollo avatar Apr 09 '20 10:04 davidzollo