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

Job runs/enqueued multiple times if server restarts while job is being processed #2380

Open
rklfss opened this issue Mar 19, 2024 · 0 comments

Comments

@rklfss
Copy link

rklfss commented Mar 19, 2024

Scenario:

  • Configure the server to use sliding visibility
    SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5.0),
    QueuePollInterval = TimeSpan.Zero,
  • Enqueue a job
  • wait for it to be in the processing state
  • restart the job server while the job is being processed
  • The dashboard shows a notification that the server stopped resopnding
    • click the re-enqueue button in the dashboard for that job before the job is re-enqueued by the system itself
      screenshot_20240319_132114

Actual result:

  • After the sliding visibility timeout is exceeded, a second instance of the job starts.
  • That's because the JobQueue table gets another entry for the job and the legacy one is used as well when the FetchedAt timestamp is outrun by the timeout
    screenshot_20240319_131757

Expected result:

  • A job can not run multiple times concurrently
  • There is not more than one entry for each job in the JobQueue table, even if the server restarts/crashes etc.
@rklfss rklfss changed the title Job runs/enqueued multiple times if server stops while job is processing Job runs/enqueued multiple times if server restarts while job is being processed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant