You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Backup succeeds after silently omitting a checkpoint-listed object #26247
Backup object copying treats a missing source object as a successful skip. A checkpoint can list an object, the destination can receive no copy of that object, and the backup path still returns success.
Reproduction
Give parallelCopyData one BackupObject whose location is listed by a checkpoint.
Use a source file service that has no file at that location.
Run the copy step.
The copy step returned nil and produced no destination object in 3/3 runs on 8c9bb66898afa74f8b231e1915d99489ae8a0da7.
Actual behavior
parallelCopyData catches ErrFileNotFound, increments an internal skip counter, and returns a successful job result. The missing object is absent from the returned file list, while execBackup continues to save backup metadata.
Expected behavior
A checkpoint-listed object that cannot be copied must fail the backup and prevent it from being reported as complete.
Impact
A completed backup can omit a data object referenced by its checkpoint. Restoring or reading that backup can then fail or produce an incomplete result.
go test ./pkg/backup -count=3 -run '^(TestParallelCopyDataReturnsMissingSourceObject|TestParallelCopyDataStopsAdmissionAfterFailure|TestParallelCopyDataWaitsForScheduledSiblingAfterFailure|...)$'
连续 3 轮均通过。缺失源对象返回 file not found 错误,复制结果不作为成功清单返回;首个不可恢复错误后不再接纳后续任务,并等待已投递的 sibling 退出后才返回。
Activity
LeftHandCold commentedon Jul 28, 2026
已在当前
main(6004becb56adc7f4d22dbfb9554bef8d7091e25d)确认根因:checkpoint 列出的对象属于备份一致性边界,但parallelCopyData遇到ErrFileNotFound时只增加skipCount并返回成功,execBackup随后仍会保存缺少该对象的成功清单。这不是理论问题;源对象被并发 GC/不可见时会产出不可完整恢复的备份。修复 PR:#26290
修复将所有对象复制错误(包括
ErrFileNotFound)返回给备份调用方;首错后停止接单、取消兄弟任务,并等待所有已提交任务退出。新增 missing object、停止 admission、等待已提交 sibling 的确定性回归;pkg/backup完整 non-race/race、focused-race -count=100、build/vet 和pkg/datasync.TestCopyFile均通过。fix(backup): fail on missing checkpoint objects (#26290)
LeftHandCold commentedon Jul 28, 2026
fixed
Ariznawlll commentedon Aug 3, 2026
测试版本
main6b3ad84c9d01d453c2bcdd0f440637350e3aa8c6pkg/backup的确定性故障注入,正常路径执行完整备份、重启、恢复和扫描校验。原问题验证
原问题的关键是 checkpoint 已列出的对象在复制时不可读/不存在,不能被当作“可忽略文件”而让备份返回成功。本轮定向执行:
连续 3 轮均通过。缺失源对象返回
file not found错误,复制结果不作为成功清单返回;首个不可恢复错误后不再接纳后续任务,并等待已投递的 sibling 退出后才返回。Happy Path 覆盖
TestCopyFileWithRetry与成功 provider-copy 控制路径连续 3 轮通过。TestBackupData连续 3 轮执行完整备份、服务重启、恢复及数据扫描,均通过(ok github.com/matrixorigin/matrixone/pkg/backup 5.286s)。Unhappy Path 覆盖
白盒验证
缺失 checkpoint 对象需要在对象存储读取处精确注入
ErrFileNotFound,普通 SQL/备份接口无法稳定制造该瞬时一致性边界,因此采用上述包内确定性故障注入。覆盖用例位于pkg/backup/tae_parallel_copy_test.go。回归测试
该问题依赖对象存储在 checkpoint 之后丢失对象的内部故障注入,适合保持为
pkg/backup白盒回归,不作为普通 motr 黑盒 case。测试证据
定向回归命令连续 3 轮结果为
ok github.com/matrixorigin/matrixone/pkg/backup 0.905s;完整备份/恢复控制连续 3 轮结果为ok github.com/matrixorigin/matrixone/pkg/backup 5.286s。测试结论
测试通过。
fix(backup): fail on missing checkpoint objects (matrixorigin#26290)
fix(backup): fail on missing checkpoint objects (matrixorigin#26290)
fix(backup): fail on missing checkpoint objects (matrixorigin#26290)