Task completion sometimes fails inside onCompleteReschedule
See original GitHub issueWe’re running db-scheduler on 2 servers, with 1s polling interval and immediate execution enabled. I have about 10 jobs and from time to time some of them fail in the onCompleteReschedule step (5-10 times a day).
Failed while completing execution Execution: task=foo, id=recurring, executionTime=2019-11-14T09:00:00.454264Z, picked=true, pickedBy=bar-567f94488b-jmq9v, lastHeartbeat=2019-11-14T09:00:00Z, version=67910. Execution will likely remain scheduled and locked/picked. The execution should be detected as dead in PT4M, and handled according to the tasks DeadExecutionHandler.
java.lang.RuntimeException: Expected one execution to be updated, but updated 0. Indicates a bug.
at com.github.kagkarlsson.scheduler.JdbcTaskRepository.rescheduleInternal(JdbcTaskRepository.java:196)
at com.github.kagkarlsson.scheduler.JdbcTaskRepository.reschedule(JdbcTaskRepository.java:154)
at com.github.kagkarlsson.scheduler.task.ExecutionOperations.reschedule(ExecutionOperations.java:38)
at com.github.kagkarlsson.scheduler.task.CompletionHandler$OnCompleteReschedule.complete(CompletionHandler.java:50)
at com.github.kagkarlsson.scheduler.Scheduler$PickAndExecute.complete(Scheduler.java:327)
at com.github.kagkarlsson.scheduler.Scheduler$PickAndExecute.executePickedExecution(Scheduler.java:309)
at com.github.kagkarlsson.scheduler.Scheduler$PickAndExecute.run(Scheduler.java:286)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
Why do we so often fail to complete the tasks that matter most ...
They both share similarities. Barriers related to advanced planning: 1. Visualizing the cost of time is hard. In some ways, time is like...
Read more >c# - Fail to wait for Task completion - ASP.NET Web API ...
CompleteTask() is a dummy method which I created as a flag in the message processor class I have, which processes information messages received ......
Read more >Don't confuse task completion with productivity
People who work remotely often claim to be 'more productive'. ... If you finish a task quickly, but then have to engage in...
Read more >How to deal with a team that fails to complete a task?
First thing is to set intermediate milestones. If you measure task completion at task completion, you have already failed. There is no ...
Read more >Setting error codes using the job completion checker - IBM
Sometimes the success or failure of a job or started-task operation cannot ... not want the operation representing the job to be marked...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will see if I can replicate the issue.
Hey folks. I got the same error using PgSQL +
lock_and_fetch
strategy. Not sure if it’s related to the strategy. PgSQL is just a regular Google Cloud SQL. I couldn’t determine what was going on. What we noticed is that the exceptions happened at times of deployment. If we find any new information, we will share it here.