-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
开启失效转移且分片任务执行后,任务会重复执行 by v2.1.0 #276
Labels
Comments
请确认一下是不是作业服务器时钟不一致导致的 |
时钟是一致的,刚才又让朋友试了下,也是同样的的问题,我是在springboot中使用的,而且把线程名称打印出来,明显感觉不太一样的 |
请提供任务执行代码,配置以及运行环境说明 |
光看描述感觉就像是正常的failover的功能,请确定一下分片0是否有执行失败的情况 |
用提供的例子执行也是这个问题, 就是用的 |
好的,我已经重现,感谢发现问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
总共4个分片,但是每次0这个分片总是在4个分片执行完后,多了个线程把0这个分片又重新执行了一次 ,也就是每次一个轮训就要有一个分片被多执行一次,每次重复执行的那次的线程名称明显可以看出可其他的不太一致(当failover设置为true时存在此问题,failover为false是没有此问题)
下面是任务输出的信息:
[ob-myTestJob7-3] com.boot.job.MyJob : ==========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=2, shardingParameter=C)
[ob-myTestJob7-2] com.boot.job.MyJob : ========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=1, shardingParameter=B)
[ob-myTestJob7-4] com.boot.job.MyJob : ========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=3, shardingParameter=D)
[ob-myTestJob7-1] com.boot.job.MyJob : =========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=0, shardingParameter=A)
[stJob7_Worker-1] com.boot.job.MyJob : =========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=0, shardingParameter=A)
[ob-myTestJob7-5] com.boot.job.MyJob : ==========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=0, shardingParameter=A)
[ob-myTestJob7-7] com.boot.job.MyJob : =========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=2, shardingParameter=C)
[ob-myTestJob7-6] com.boot.job.MyJob : ==========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=1, shardingParameter=B)
[ob-myTestJob7-8] com.boot.job.MyJob : ========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0,1,2,3@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=3, shardingParameter=D)
[stJob7_Worker-1] com.boot.job.MyJob : =========开始执行定时任务ShardingContext(jobName=myTestJob7, taskId=myTestJob7@-@0@-@ready@[email protected]@-@8eff493d-92e4-4415-a437-b4b38ceca74b, shardingTotalCount=4, jobParameter=ss, shardingItem=0, shardingParameter=A)
The text was updated successfully, but these errors were encountered: