xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.35k stars 10.82k forks source link

xxl-job-admin集群部署会重复执行调度任务吗? #2643

Open cwtree opened 2 years ago

cwtree commented 2 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

2.3.0

Expected behavior

xxl-job-admin集群多台部署的时候,怎么控制任务不会重复执行的?

任何都是xxl-job-admin去调度的,多个xxl-job-admin怎么保证不会重复调度执行的? 具体原理或者源码在哪?

Actual behavior

容器部署多台xxl-job-admin

Steps to reproduce the behavior

no

Other information

no

zhuzhenting commented 2 years ago

通过 xxl_job_lock 的排它锁控制每个时间段只有一台机器在读取任务列表

liuchunhe2021 commented 2 years ago

select * from xxl_job_lock where lock_name = 'schedule_lock' for update 通过xxl_job_lock这个表控制的,每次只会有一台机器执行调度任务

syu723 commented 1 year ago

官方文档写着集群下小概率会出现重复调度情况,而且我们项目中也出现了

yanhua-volvo commented 7 months ago

2.30版本不是说已经修复了,我们项目也出现了