Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

br: Ignore ddl jobs with empty query or blacklist type when exec restore #1480

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

WangLe1321
Copy link

@WangLe1321 WangLe1321 commented Dec 13, 2022

Signed-off-by: WangLe1321 [email protected]

What problem does this PR solve?

Issue Number: #33322

cherry-pick pingcap/tidb#33384

Problem Summary: Sometimes, query of ddl job can be empty, which will cause error when execute incremental restore.

What is changed and how it works?

During backup, when we find ddl job with action types about TiFlash or lock/unlock table, we will set the query empty. So we add an action type blacklist, ddl job with action type in blacklist will be ignored. We also ignore ddl job with empty query in case other unexpected situation.

This means that we will ignore ddl jobs about TiFlash or lock/unlock table and ddl jobs with empty query, so they won't cause error by mistake.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Side effects

Related changes

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

Release note

Fix a bug that BR incremental restore return error by mistake caused by ddl job with empty query.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 13, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • YuJuncen
  • joccau

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2022

CLA assistant check
All committers have signed the CLA.

@joccau
Copy link
Member

joccau commented Dec 13, 2022

cherry-pick pingcap/tidb#33384

Copy link
Member

@joccau joccau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 LGTM1 label Dec 13, 2022
@joccau
Copy link
Member

joccau commented Dec 14, 2022

/merge

@ti-chi-bot
Copy link
Member

@joccau: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

In response to this:

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@YuJuncen
Copy link
Collaborator

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 6790ba7

@ti-chi-bot ti-chi-bot merged commit 1a12817 into pingcap:release-5.1 Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants