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

Aperta
#183 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
database

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
96
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di channable/opsqueue

Tutte le issue di channable/opsqueue

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.