storage-sqlite: a restore slot test checks the slot before the copy frees it

Aperta Adatta ai principianti
#872 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@Dodothereal ci sta già lavorando.

Dal 6/11/2026.

  • #882 di @Dodothereal — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust, sqlite
Ambito
databases, testing

Direzione di ricerca

Leggi crates/storage-sqlite/src/backup.rs, in particolare backup::restore_tests::reconciler_fencing::a_running_restore_holds_its_slot_and_is_not_listed_dead_by_its_heartbeat, e confronta il controllo dello slot con il ciclo di attesa esistente su engine.job_slots.holds(&slot). Aggiungi un’attesa limitata nel tempo dopo il ritorno di wait_for_copy, quindi esegui quel test; il lavoro è concluso quando attende in modo affidabile che lo slot di restore venga liberato prima di eseguire l’asserzione.

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

Descrizione

ci:stability sqlite

backup::restore_tests::reconciler_fencing::a_running_restore_holds_its_slot_and_is_not_listed_dead_by_its_heartbeat (crates/storage-sqlite/src/backup.rs) failed in run-tests (stable) of job 127447427993, on #868 on 5 November 18:33 UTC, with the slot is freed with the claim when the copy ends. #868 does not change storage-sqlite, and the rerun of the job passed. In the 184 completed runs of test.yml before it, from 3 to 5 November, this test did not fail.

The test calls wait_for_copy, which returns when the target's table_status is ACTIVE. Then it asserts at once that job_slots no longer holds the restore's slot. The copy commits ACTIVE in its own transaction and returns. The slot is freed later, when the job's claim (crates/storage-sqlite/src/backup_catalog.rs) is dropped. So a check that runs between the two sees the slot held.

A fix that keeps the assertion is to wait, with a time limit, for the slot to be freed after wait_for_copy returns. Another test in the same module already waits that way, in a loop on engine.job_slots.holds(&slot).

Lingua principale
Rust
Stelle
517
Fork
60
Merge medio
5g 3h
PR unite (30g)
79

Preparare l'ambiente

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 ExtendDB/extenddb

Tutte le issue di ExtendDB/extenddb

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.