Skip to content

The way we query the DB in submission_status is prone to breakage #183

Description

@SemMulder

In common/submission.rs:submission_status we have the following comment:

// NOTE: The order is important here; a concurrent writer could move a submission
// from Paused to InProgress/Cancelled in-between the queries.
// from InProgress to Completed/Failed/Cancelled in-between the queries.

Instead of relying on our attention to detail. Let's rewrite the queries here to use a transaction and/or merge them into a single query using UNION ALL.

Found in #132 (comment).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions