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

raftstore, storage: return FlashbackNotPrepared error if the flashback commit check failed #14145

Merged
merged 6 commits into from Feb 6, 2023

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Feb 6, 2023

Signed-off-by: JmPotato ghzpotato@gmail.com

What is changed and how it works?

Issue Number: Close #14143. Should merge after pingcap/kvproto#1054.

What's Changed:

As https://github.com/tikv/tikv/issues/14143 mentioned, flashback should not
return `TxnLockNotFound` error to the client if the flashback commit check failed,
which will cause TiDB to retry the flashback forever. This PR changes this error to
`FlashbackNotPrepared` to match the client handling logic.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 6, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Connor1996
  • sticnarf

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.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot ti-chi-bot added size/M and removed size/S labels Feb 6, 2023
@JmPotato JmPotato changed the title raftstore, storage: do not return TxnLockNotFound error during the flashback commit check raftstore, storage: directly return if the flashback commit check failed Feb 6, 2023
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
@JmPotato JmPotato changed the title raftstore, storage: directly return if the flashback commit check failed raftstore, storage: return FlashbackNotPrepared error if the flashback commit check failed Feb 6, 2023
@JmPotato JmPotato marked this pull request as ready for review February 6, 2023 06:59
@ti-chi-bot ti-chi-bot added the status/LGT1 Status: PR - There is already 1 approval label Feb 6, 2023
Copy link
Member

@HuSharp HuSharp 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
Copy link
Member

@HuSharp: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

LGTM!

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.

Copy link
Member

@Connor1996 Connor1996 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 status/LGT2 Status: PR - There are already 2 approvals and removed status/LGT1 Status: PR - There is already 1 approval labels Feb 6, 2023
@Connor1996
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

@Connor1996: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

@ti-chi-bot
Copy link
Member

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

Commit hash: ef3706c

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Feb 6, 2023
@ti-chi-bot
Copy link
Member

@JmPotato: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot ti-chi-bot removed the status/can-merge Status: Can merge to base branch label Feb 6, 2023
@Connor1996
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

@Connor1996: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

@ti-chi-bot
Copy link
Member

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

Commit hash: c501da4

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Feb 6, 2023
@ti-chi-bot ti-chi-bot merged commit 7c20add into tikv:master Feb 6, 2023
@ti-chi-bot ti-chi-bot added this to the Pool milestone Feb 6, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #14148.

ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Feb 6, 2023
close tikv#14143, ref tikv#14143

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@JmPotato JmPotato deleted the return_flashback_ts_in_err branch February 6, 2023 08:59
@JmPotato JmPotato restored the return_flashback_ts_in_err branch February 6, 2023 09:38
@JmPotato JmPotato deleted the return_flashback_ts_in_err branch February 6, 2023 09:40
JmPotato added a commit to ti-chi-bot/tikv that referenced this pull request Feb 6, 2023
close tikv#14143, ref tikv#14143

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot added a commit that referenced this pull request Feb 8, 2023
…k commit check failed (#14145) (#14148)

close #14143, ref #14143, ref #14145

As #14143 mentioned, flashback should not
return `TxnLockNotFound` error to the client if the flashback commit check failed,
which will cause TiDB to retry the flashback forever. This PR changes this error to
`FlashbackNotPrepared` to match the client handling logic.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.5 release-note-none size/M status/can-merge Status: Can merge to base branch status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flashback should not return any unexpected error to the client
5 participants