Test a_retry_waits_on_its_registration_and_another_backup_is_refused fails when the first restore finishes before the third request

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

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

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

Research direction

Start with crates/engine/src/backup/tests.rs, especially the failing test and the nearby tests that use bulk_load_gate and closed_gate(). Hold the first restore's bulk load until after the third request assertion, then open the gate. Run backup::tests::a_retry_waits_on_its_registration_and_another_backup_is_refused; it should pass with the third request receiving TableInUseException.

Written by the indexing model from the issue text.

Description

bug

What happens

backup::tests::a_retry_waits_on_its_registration_and_another_backup_is_refused in crates/engine/src/backup/tests.rs failed in the mongodb-rust job of #830's CI on 2026-11-07 (run 42325897438, job 128260989427):

panicked at crates/engine/src/backup/tests.rs:18576:5:
TableAlreadyExistsException("Table already exists: MusicRestored")

The same job passed twice on main at 76b9710dc and once on #411. #830 does not change crates/engine.

Why

The test sends three restore requests for the target MusicRestored:

  1. claim_restore_delay holds the first request's registration for 400 ms.
  2. A retry of the same request waits for that registration and gets the CREATING description.
  3. A restore of another backup into the same name expects TableInUseException. A committed registration gives that answer while its restore job runs.

Nothing holds the first restore's job, and the backup has two items. If the job finishes before the third request, the table is ACTIVE, and the third request gets TableAlreadyExistsException. That is the answer in the failed run.

Suggested fix

Hold the first restore's bulk load with bulk_load_gate and a closed_gate(), as other tests in the same file do. Open the gate after the assertion on the third request.

Related: #740.

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.