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

未关闭 适合新手
#908 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
testing

调研方向

从 crates/engine/src/backup/tests.rs 开始,重点查看失败的测试,以及附近使用 bulk_load_gate 和 closed_gate() 的测试。将第一次恢复的批量加载保持暂停,直到第三个请求的断言完成,然后打开闸门。运行 backup::tests::a_retry_waits_on_its_registration_and_another_backup_is_refused;测试应该通过,第三个请求会收到 TableInUseException。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
517
派生
60
平均合并
5 天 3 小时
30 天内合并 PR
79

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ExtendDB/extenddb 的其他 Issue

查看 ExtendDB/extenddb 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。