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

Bug report - Overlapping scheduler jobs cause conflict #526

Open
djwooten opened this issue Jun 19, 2024 · 0 comments · May be fixed by #529
Open

Bug report - Overlapping scheduler jobs cause conflict #526

djwooten opened this issue Jun 19, 2024 · 0 comments · May be fixed by #529
Labels

Comments

@djwooten
Copy link

Describe the bug

I have several reports in the Uploads table that have status = "IN TREATMENT" and message = "The document has been uploaded successfully". Looking at upload_reports_job() this shouldn't be possible, as that message is only set if the status is simultaneously set to "TREATED".

To Reproduce

I believe that what has happened is

  1. Too many reports were added to the uploads/ directory.
  2. The scheduler job (job 1) starts processing these reports.
  3. Before job 1 is done, a second scheduler job (job 2) begins that tries to process some of the same reports that are still listed as "NOT TREATED", because job 1 hasn't gotten to them yet.
  4. One of the jobs processes a report, sets it to status="TREATED" and message="The document has been uploaded successfully", and then deletes the file before the other job gets to it.
  5. When the other job gets to the same report, it updates the row to "IN TREATMENT" again, and then crashes when it tries to load the file to determine gzipped status, because the file doesn't exit anymore.

Expected behavior
The reports should not show up as pending reports with "IN TREATMENT" status, but rather should be "TREATED".

System Details

  • SQL database: postgres
  • MegaQC: v0.3.0
@djwooten djwooten added the bug label Jun 19, 2024
@djwooten djwooten linked a pull request Jun 28, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant