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

Possible race condition in submission/views submit_review #2515

Closed
hardyoyo opened this issue Oct 13, 2021 · 0 comments
Closed

Possible race condition in submission/views submit_review #2515

hardyoyo opened this issue Oct 13, 2021 · 0 comments
Labels
bug Something's not working

Comments

@hardyoyo
Copy link
Contributor

Describe the bug
In troubleshooting another issue (which hasn't been reported, yet, but is related to #1654 ), we were tracing the code responsible for creating a workflowlog event as part of the submission process, and settled on the possibility that the workflow chunk in this section of code:

https://github.com/BirkbeckCTP/janeway/blob/68593d9c4661af5a4363b29cd2f1d83fa3b8ddb8/src/submission/views.py#L537-L543

... might need to be called earlier in the process, possibly immediately after the article.save() at line 519.

Janeway version
preprint-merge, head

To Reproduce
Steps to reproduce the behavior:

Not currently available.

Expected behavior
All articles, after they are submitted, should have a workflowlog entry. Under certain circumstances (not yet known to us) an article can be in a review workflow, without a workflowlog entry.

Screenshots
none

Front-end Issues

If the issue is front-end specific please add the following details:
n/a

Smartphone (please complete the following information):
n/a

Additional context
none

@hardyoyo hardyoyo added the bug Something's not working label Oct 13, 2021
hardyoyo added a commit to hardyoyo/janeway that referenced this issue Oct 13, 2021
In submit_review, raise the event for ON_WORKFLOW_ELEMENT_COMPLETE to
immediately after the article.save, to avoid a possible race condition
which might cause an article to be in the review queue but without an
entry in the workflowlog.

Fixes openlibhums#2515
ajrbyers pushed a commit that referenced this issue Oct 19, 2021
In submit_review, raise the event for ON_WORKFLOW_ELEMENT_COMPLETE to
immediately after the article.save, to avoid a possible race condition
which might cause an article to be in the review queue but without an
entry in the workflowlog.

Fixes #2515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's not working
Projects
None yet
Development

No branches or pull requests

2 participants