Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Searched open/closed MatrixOne and mo-backup issues for copyTae, restore file not found, and backup/index/missing-file failures; no matching report found. Discovered while validating #32169; this is a separate existing consumer behavior.
Branch Name
mo-backup main (external MatrixOne backup/restore consumer).
Commit ID
matrixorigin/mo-backup@84cb6f797cbfda622258a96f5bd629ce566d24f4.
Other Environment Information
Linux amd64, isolated MinIO, real TAE full + incremental backup files. No production mutation. The consumer source is a clean worktree plus external test harnesses; no product fixes applied to mo-backup.
Actual Behavior
An incorrect file-index entry can cause copyTae to return nil while omitting a file explicitly listed by tae_list.
- At
pkg/run/restore.go:415-429, an index entry selects a backup directory without confirming that the file exists there. A non-nil selected metadata entry prevents the other lookup strategies. - At
pkg/run/restore.go:479-487,copyFilesconvertsErrFileNotFoundinto a successful job result, with only a skip log.
Expected Behavior
A restore must not report success unless all required manifest references resolve to valid files. If another historical directory has a proven matching file, it may be considered through an explicit validated fallback; otherwise the restore must fail.
Steps to Reproduce
- Create a real full backup and an incremental backup with at least one
NeedCopy=falsereference to an older file. - Confirm the file exists in the older backup and is absent from the current incremental directory.
- Change only an in-memory copy of the loaded index so that this filename points to the current directory. Do not mutate the backup fixtures.
- Call the unmodified
copyTaeconsumer with a fresh restore destination. - Observe a nil result and absent target file. An independent Stat/checksum oracle rejects the restore.
This was reproduced against backup chains produced by both current main and 4.2-dev. All normal indexed/non-indexed restores passed; the negative control exposed the false-success path.
Additional information
Confirmed: consumer false success and a missing restored file. Not claimed: that the current production backup incident was caused by a malformed index, or that a complete production restore has lost data. This behavior predates and is not changed by the kernel copy-decision fix in #32169.
Activity
LeftHandCold commentedon Nov 5, 2026
Fix submitted for review: https://github.com/matrixorigin/mo-backup/pull/84 (main, c859372773a6a5ab6016f2215e4c16ab0292cad4). The restore now rejects unresolved/missing required archive files and cancels/joins its owned copy workers. Validated on the requested test host: old-source red/fixed-source green, focused race stress, and real TAE + MinIO full/incremental restores with content checks and engine restarts using both kernel branches. The stale-index negative control now fails instead of reporting restore success. Existing full-package baseline failures and the intentional no-auto-repair boundary are documented in the PR. No production deployment performed.
fix(backup): reuse immutable objects across incremental backups (#32172)
fix(backup): reuse immutable objects across incremental backups (4.2-…