api: use Domain.select_for_update() to prevent races

Aperta
#1,292 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 14 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, database

Direzione di ricerca

Start from commit 1c25419e7e0ed4a0be0fd6b50bdcd7997177632f, which the issue names as the source of the race, and find the code path where a Domain is read and then modified without a row lock. The fix is to lock the Domain row with select_for_update() inside a transaction at that point. Done when the racy path takes the lock and the existing API tests still pass.

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

Descrizione

api bug

for fixing 1c25419e7e0ed4a0be0fd6b50bdcd7997177632f at the root

Lingua principale
Python
Stelle
678
Fork
74
Merge medio
7g 23h
PR unite (30g)
1

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 desec-io/desec-stack

Tutte le issue di desec-io/desec-stack

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.