Skip to content
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

Unresolved execution detection never deletes old tasks if service restarts too often #515

Open
GeorgEchterling opened this issue Jul 17, 2024 · 1 comment
Labels

Comments

@GeorgEchterling
Copy link
Contributor

Expected Behavior

The unresolved execution detection should delete unresolved tasks once they have been due for the duration configured in deleteUnresolvedAfter. (Default: 14 days)

Current Behavior

The unresolved execution detection only deletes unresolved tasks after the local scheduler instance has detected the unresolved task for the configured duration. If the service never runs for that duration (due to updates or restarts), unresolved tasks are never deleted.

If this is the intended behaviour, it should be documented.

Workaround: I've reduced deleteUnresolvedAfter to 3 days, since the service regularly receives updates and never runs for 14 days straight.

Steps to Reproduce the bug

  1. Create a recurring task
  2. Delete the task implementation
  3. Restart the scheduler
  4. Restart the scheduler before the timeout configured in deleteUnresolvedAfter
  5. The task won't be deleted until deleteUnresolvedAfter after the latest restart

Context

  • DB-Scheduler Version : 14.0.2
  • Java Version : 21
  • Spring Boot (check for Yes) : [x]
  • Database and Version : MariaDB 10.11
@kagkarlsson
Copy link
Owner

Yes, you are correct. It should be changed to age = now - execution-time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants