pingcap / pingcap/tidb-operator

Optimize bks backup logic

Open
#4,766 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

Feature Request

Is your feature request related to a problem? Please describe:

when delete bks,bk will be deleted and the whole backup will be deleted

Describe the feature you'd like:

It is recommended to implement delete --cascade=orphan: only delete BackupSchedule to make backup an orphan. If the same BackupSchedule is created at that time, these orphans can be associated again;
Currently BackupSchedule->Backup->job has this kind of relationship. According to the default garbage collection policy, if the upper level is deleted, the lower level will be deleted, so there must be a way to make a certain level an orphan
In this way, it is more flexible to adjust the related policies of scheduled backups, especially in the case where the actual running time is inconsistent with the expected running time, the best way is to delete it and start again.
Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BackupSchedule-to-Backup-to-job ownership and garbage-collection logic in the operator. Define how a cascade=orphan deletion should preserve backups and allow them to be associated with a newly created BackupSchedule, then verify the behavior across the relevant backup lifecycle.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.