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

*: multi-query prefetch support pessimistic transaction #18439

Merged
merged 3 commits into from
Jul 10, 2020

Conversation

coocood
Copy link
Member

@coocood coocood commented Jul 8, 2020

What problem does this PR solve?

Performance improvement.

What is changed and how it works?

Call lock keys for pessimistic transactions for multi-statement query.
So we can avoid RPC call during each statement execution.

Check List

Tests

  • Unit test

Release note

  • multi-query prefetch support pessimistic transaction

@coocood coocood requested a review from a team as a code owner July 8, 2020 08:15
@coocood coocood requested review from qw4990, lysu and bobotu and removed request for a team July 8, 2020 08:15
// we can get the keys from the lock cache.
// TODO: In the future we can support pre lock point keys for pessimistic transactions.
return nil, nil
if vars.IsReadConsistencyTxn() {
Copy link
Member

Choose a reason for hiding this comment

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

I think if it is a multi-query, we could prefetch data for RC transaction.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do it in the future.

@github-actions github-actions bot added the sig/execution SIG execution label Jul 8, 2020
@coocood coocood force-pushed the batch-update-pessimistic branch from a6fc11b to 950b594 Compare July 8, 2020 09:02
Copy link
Contributor

@lysu lysu 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 8, 2020
@ti-srebot
Copy link
Contributor

@lysu,Thanks for your review.

Copy link
Member

@jackysp jackysp 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-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jul 10, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 10, 2020
@ti-srebot
Copy link
Contributor

@jackysp,Thanks for your review.

@jackysp
Copy link
Member

jackysp commented Jul 10, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 10, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@coocood merge failed.

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #18439 into master will increase coverage by 0.1625%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             master     #18439        +/-   ##
================================================
+ Coverage   79.4223%   79.5849%   +0.1625%     
================================================
  Files           540        540                
  Lines        144861     145990      +1129     
================================================
+ Hits         115052     116186      +1134     
+ Misses        20513      20487        -26     
- Partials       9296       9317        +21     

@qw4990 qw4990 removed their request for review July 10, 2020 07:42
@coocood
Copy link
Member Author

coocood commented Jul 10, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@coocood merge failed.

@coocood
Copy link
Member Author

coocood commented Jul 10, 2020

/run-check_dev_2

@coocood coocood merged commit 8a66104 into pingcap:master Jul 10, 2020
@coocood coocood deleted the batch-update-pessimistic branch July 10, 2020 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution 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