Skip to content

planner: forbid prepared stale select in txn#25375

Merged
ti-chi-bot merged 3 commits into
pingcap:masterfrom
xhebox:stale_7
Jun 15, 2021
Merged

planner: forbid prepared stale select in txn#25375
ti-chi-bot merged 3 commits into
pingcap:masterfrom
xhebox:stale_7

Conversation

@xhebox
Copy link
Copy Markdown
Contributor

@xhebox xhebox commented Jun 11, 2021

Signed-off-by: xhe xw897002528@gmail.com

What problem does this PR solve?

Problem Summary: #25156 (comment). Forbid prepared stale select in all txns.

What is changed and how it works?

What's Changed:

  1. Prepared stale select is forbidden in all txn.
  2. Error is refined. Unknown error!%(Extra string..., the original error is like so. It is so ugly.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Forbid prepared stale select in transactions

Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox xhebox requested review from Yisaer and nolouch June 11, 2021 13:09
@xhebox xhebox requested review from a team as code owners June 11, 2021 13:09
@xhebox xhebox requested review from qw4990 and removed request for a team June 11, 2021 13:09
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 11, 2021
@xhebox xhebox removed the request for review from qw4990 June 11, 2021 13:09
@github-actions github-actions Bot added the sig/execution SIG execution label Jun 11, 2021
@nolouch nolouch removed the sig/execution SIG execution label Jun 11, 2021
Copy link
Copy Markdown
Member

@nolouch nolouch 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 Indicates that a PR has LGTM 1. label Jun 11, 2021
@github-actions github-actions Bot added the sig/execution SIG execution label Jun 11, 2021
Copy link
Copy Markdown
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

Could you add a testcase?

@xhebox
Copy link
Copy Markdown
Contributor Author

xhebox commented Jun 15, 2021

@Yisaer It is already included in the previous PR. Now it is changed to c.Assert(err, NotNil) in stale_txn_test.go.

@Yisaer
Copy link
Copy Markdown
Contributor

Yisaer commented Jun 15, 2021

@Yisaer It is already included in the previous PR. Now it is changed to c.Assert(err, NotNil) in stale_txn_test.go.

got it.

@ti-chi-bot
Copy link
Copy Markdown
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Yisaer
  • nolouch

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.

Details

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

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 15, 2021
@Yisaer
Copy link
Copy Markdown
Contributor

Yisaer commented Jun 15, 2021

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

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

DetailsCommit hash: 83ff4cc

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 15, 2021
@Yisaer
Copy link
Copy Markdown
Contributor

Yisaer commented Jun 15, 2021

/run-integration-common-test

@ti-chi-bot ti-chi-bot merged commit 07d0b2d into pingcap:master Jun 15, 2021
@xhebox xhebox deleted the stale_7 branch June 15, 2021 06:31
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jun 15, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Copy Markdown
Contributor

cherry pick to release-5.1 in PR #25413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-cherry-pick-release-5.1 sig/execution SIG execution size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants