The way we query the DB in `submission_status` is prone to breakage
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
Research direction
Start in common/submission.rs at submission_status and inspect the existing database queries and their ordering assumptions. Choose a transaction or UNION ALL approach that makes the status read consistent under concurrent writes, while preserving the current results and status behavior.
Written by the indexing model from the issue text.
Description
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 https://github.com/channable/opsqueue/pull/132#discussion_r3776586912.
- Dominant language
- Rust
- Stars
- 96
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from channable/opsqueue
-
Make `submissions_canceled` and `add_chunks_done_to_submissions_failed` migrations bidirectional Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in channable/opsqueue
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
bug rules
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
app bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
IronCoreLabs/ironcore-alloy#346 ·
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100