xuxueli / xxl-job

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

Couldn't remove trigger: Deadlock found when trying to get lock; try restarting transaction org.quartz.JobPersistenceException: Couldn't remove trigger: Deadlock found when trying to get lock; try restarting transaction #791

Closed huangzhen1201 closed 5 years ago

huangzhen1201 commented 5 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

version : 2.0.2

Expected behavior

删除任务

Actual behavior

抛异常

Steps to reproduce the behavior

删除任务-偶发现象

Other information

Couldn't remove trigger: Deadlock found when trying to get lock; try restarting transaction org.quartz.JobPersistenceException: Couldn't remove trigger: Deadlock found when trying to get lock; try restarting transaction at org.quartz.impl.jdbcjobstore.JobStoreSupport.removeTrigger(JobStoreSupport.java:1462) at org.quartz.impl.jdbcjobstore.JobStoreSupport$10.execute(JobStoreSupport.java:1432) at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:245) at org.quartz.impl.jdbcjobstore.JobStoreSupport.removeTrigger(JobStoreSupport.java:1428) at org.quartz.core.QuartzScheduler.unscheduleJob(QuartzScheduler.java:1059) at org.quartz.core.QuartzScheduler.deleteJob(QuartzScheduler.java:960) at org.quartz.impl.StdScheduler.deleteJob(StdScheduler.java:301) at com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler.removeJob(XxlJobDynamicScheduler.java:246) at com.xxl.job.admin.service.impl.XxlJobServiceImpl.remove(XxlJobServiceImpl.java:257) at com.xxl.job.admin.controller.JobInfoController.remove(JobInfoController.java:80) at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHa

xuxueli commented 5 years ago

quartz 底层逻辑的问题。 后续新版本考虑自研trigger组件,届时不会存在该问题。