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

Ouverte
#5,319 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
62/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
go, kubernetes, mariadb
Domaine
backend, databases

Piste de recherche

Start in internal/backupcontroller/mariadbstrategy_controller.go at the restore path, where the recorded dump name is trusted after an existence check. Then read contestedMariaDBDump in mariadbstrategy_cleanup.go and reuse its check against the other runs on the prefix. Done when restore falls back to the best-effort path and raises the BestEffortDump warning whenever another run could own the dump.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area/database kind/bug triage/needs-triage

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.

Langage dominant
Go
Étoiles
2.2k
Forks
209
Merge moyen
4 j 14 h
PR mergées (30 j)
140

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cozystack/cozystack

Toutes les issues de cozystack/cozystack

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.