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

executor: support innodb_lock_wait_timeout for pessimistic transaction(#13103) #13165

Merged
merged 7 commits into from
Nov 9, 2019

Conversation

cfzjywxk
Copy link
Contributor

@cfzjywxk cfzjywxk commented Nov 5, 2019

What problem does this PR solve?

What is changed and how it works?

the kvproto pull request is here link

Check List

Tests

  • Unit test

Code changes

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

Side effects

  • Increased code complexity

Related changes

  • Need to update the documentation

Release note

  • Write release note for bug-fix or new feature.

tk2.MustExec("commit")
tk3.MustExec("commit")

tk.MustQuery(`select * from tk where c1 = 1`).Check(testkit.Rows("1 1"))
Copy link
Member

Choose a reason for hiding this comment

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

We can select and check multiple rows.

// txn not found, and before the commit operation other transaction may lock succeed(from the user side,
// the first transaction did not release lock yet)
if err != nil {
newForUpdateTS, tsErr := a.GetTimestampWithRetry(ctx)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@coocood Is this appropriate to update forUpdateTs if err != nil (ErrNoWaitSet, ErrLockWaitTimeout ...)

Copy link
Member

Choose a reason for hiding this comment

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

yes

This reverts commit 2b8a418.
This reverts commit a8dfb54.
@coocood
Copy link
Member

coocood commented Nov 6, 2019

LGTM

waiting for tikv/tikv#5680 to be picked to release-3.0

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Nov 9, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 9, 2019

Your auto merge job has been accepted, waiting for 13290

@sre-bot
Copy link
Contributor

sre-bot commented Nov 9, 2019

/run-all-tests

@sre-bot sre-bot merged commit a870c23 into pingcap:release-3.0 Nov 9, 2019
@cfzjywxk cfzjywxk changed the title executor: support innodb_lock_wait_timeout for pessimistic transaction executor: support innodb_lock_wait_timeout for pessimistic transaction(#13103) Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution sig/transaction SIG:Transaction 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.

4 participants