Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ebs br: resume gc and scheduler when volume snapshots created (#5288) #5298

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #5288

What problem does this PR solve?

  1. resume gc and pd scheduler when all the volume snapshots are created
    Closes ebs br: shrink the window of pause gc and schedule during backup #5256

  2. send SIGTERM to the BR process when tidb-backup-manager receives SIGTERM

  3. read stderr async in case that the pipe of stderr is full and blocks the BR process
    Closes backup job is stuck(snapshot is completed) #5281

  4. The EBS backup task may cause the import task to fail
    Closes The EBS backup task may cause the import task to fail #5282

What is changed and how does it work?

data plane:

  1. check if the backupmeta file is existed when the backup enter execute phase. if it is existed, modify backup status VolumeBackupSnapshotsCreated

control plane:
2. if all the backups in data plane has status VolumeBackupSnapshotsCreated, modify resumeGcSchedule field true in the backup that is responsible to pause gc and pd schduler.

data plane:
3. if resumeGcSchedule field is true, delete the initialize pod and modify backup status VolumeBackupInitializeComplete

control plane:
5. if the backup with resumeGcSchedule: true has status VolumeBackupInitializeComplete, modify volume backup status SnapshotsCreated. It means all the volume snapshots are created and gc and pd schedulers are resumed.

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 25, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign gozssky for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2023

Codecov Report

Merging #5298 (1d93d0a) into release-1.5 (d5d4b38) will increase coverage by 2.70%.
Report is 1 commits behind head on release-1.5.
The diff coverage is 39.50%.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.5    #5298      +/-   ##
===============================================
+ Coverage        57.53%   60.24%   +2.70%     
===============================================
  Files              251      258       +7     
  Lines            30210    34238    +4028     
===============================================
+ Hits             17382    20626    +3244     
- Misses           11122    11749     +627     
- Partials          1706     1863     +157     
Flag Coverage Δ
e2e 27.76% <4.76%> (?)
unittest 57.48% <41.75%> (-0.06%) ⬇️

@BornChanger
Copy link
Contributor

/retest

@csuzhangxc csuzhangxc merged commit 3d41f93 into pingcap:release-1.5 Sep 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants