Repository navigation
test(storage-sqlite): wait for restore slot to be freed after copy finishes - #882
Draft
Dodothereal wants to merge 1 commit into
Draft
Dodothereal wants to merge 1 commit into
Dodothereal wants to merge 1 commit into
Conversation
…nishes Fixes ExtendDB#872. In a_running_restore_holds_its_slot_and_is_not_listed_dead_by_its_heartbeat, wait_for_copy returns as soon as the target table status is committed to ACTIVE. The job claim is dropped slightly later when the task cleans up, so an immediate check on engine.job_slots.holds(&slot) can see the slot still held. Wait with a 30s deadline matching the pattern used in the same test module.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #872. In
crates/storage-sqlite/src/backup.rs, the testbackup::restore_tests::reconciler_fencing::a_running_restore_holds_its_slot_and_is_not_listed_dead_by_its_heartbeatoccasionally failed in CI with:the slot is freed with the claim when the copy endswait_for_copyreturns as soon as the target table status is committed toACTIVE. The job slot is freed slightly later when the restore task's claim incrates/storage-sqlite/src/backup_catalog.rsis dropped. An immediate check onengine.job_slots.holds(&slot)can therefore race with the cleanup.This change waits with a 30-second deadline for the slot to be freed, matching the pattern already used in the same test module.
Validation
cargo fmt --checkpassed.set -o pipefail && cargo test -p extenddb-storage-sqlite --lib a_running_restore_holds_its_slot_and_is_not_listed_dead_by_its_heartbeatpassed (1 passed in 0.43s).Provenance
Prepared with AI assistance (Gemini 3.8 Flash) under contributor authorization. Draft status preserved pending review.