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

Open Beginner friendly
#872 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

@Dodothereal is already working on this.

Since Nov 6, 2026.

  • #882 by @Dodothereal — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust, sqlite
Domain
databases, testing

Research direction

Read crates/storage-sqlite/src/backup.rs, especially backup::restore_tests::reconciler_fencing::a_running_restore_holds_its_slot_and_is_not_listed_dead_by_its_heartbeat, and compare its slot check with the existing wait loop on engine.job_slots.holds(&slot). Add a time limited wait after wait_for_copy returns, then run that test; done means it reliably waits for the restore slot to be freed before asserting.

Written by the indexing model from the issue text.

Description

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).

Dominant language
Rust
Stars
517
Forks
60
Avg merge
5d 3h
Merged PRs (30d)
79

Getting set up

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

All issues in ExtendDB/extenddb

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.