Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
66/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
database

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from channable/opsqueue

All issues in channable/opsqueue

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.