Skip to content

[Bug]: mo-backup restore reports success after skipping a required missing archive file #32170

Closed

Description

@LeftHandCold

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.

  1. 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.
  2. At pkg/run/restore.go:479-487, copyFiles converts ErrFileNotFound into a successful job result, with only a skip log.

Consumer source.

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

  1. Create a real full backup and an incremental backup with at least one NeedCopy=false reference to an older file.
  2. Confirm the file exists in the older backup and is absent from the current incremental directory.
  3. 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.
  4. Call the unmodified copyTae consumer with a fresh restore destination.
  5. 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

  1. added
    kind/bug
    on Nov 4, 2026
  2. added
    severity/s0
    and removed on Nov 5, 2026
  3. LeftHandCold commented on Nov 5, 2026

    @LeftHandCold
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions