Skip to content

fix(backups): a MariaDB restore can pin a dump another overlapping run uploaded #5319

Open

Description

A MariaDB restore trusts the dump name recorded on the Backup and checks only that the object exists (internal/backupcontroller/mariadbstrategy_controller.go, the restore path added in #5227). The probe that records the name lets only finished runs contest the attribution. So when two backup runs of one application overlap, a dump uploaded by the run that was still unfinished at probe time can be recorded as this Backup's dump, and the restore then pins it without the BestEffortDump warning.

This is not a regression: before #5227 the restore took the newest dump in that case too. The delete path already handles it: contestedMariaDBDump in mariadbstrategy_cleanup.go re-checks the recorded name against every run on the prefix.

Fix: run the same contest on restore, and when another run could own the dump, fall back to the best-effort path and raise the BestEffortDump warning.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/bugCategorizes issue or PR as related to a bugtriage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions