Skip to content

*: not send tso request when point get with max tso (#11981)#16335

Merged
sre-bot merged 4 commits intopingcap:release-3.0from
sre-bot:release-3.0-dffe29355a0b
Apr 14, 2020
Merged

*: not send tso request when point get with max tso (#11981)#16335
sre-bot merged 4 commits intopingcap:release-3.0from
sre-bot:release-3.0-dffe29355a0b

Conversation

@sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 13, 2020

cherry-pick #11981 to release-3.0


What problem does this PR solve?

Point get without double read will use maxUint64 as transaction tso. Then no need to send tso request to PD.

This PR will delay to get txn future after try fast point, so it may have a little performance regression in the case of need to get tso from PD. Especially in the situation of point get with double read.

BenchMark

Environment: In my local machine: 1 TiDB, 1 PD, 5 TiKV.

Best case: Point get with max tso

Before

  • point get QPS is 25.7k

image

image

This PR

  • point get QPS is 31.4k

image

image

Worst case: Point get with double read can't use max tso

Before

  • point get with double read QPS is 17.8k

In this PR

  • point get with double read QPS is 17.1k

As you can see, since I delay use get txn future, there is a performance regression is this situation.

What is changed and how it works?

Check List

Tests

  • No test.

Code changes

  • Has exported function/method change

Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 13, 2020

/run-all-tests

@jackysp
Copy link
Contributor

jackysp commented Apr 14, 2020

/run-all-tests

1 similar comment
@jackysp
Copy link
Contributor

jackysp commented Apr 14, 2020

/run-all-tests

@coocood
Copy link
Member

coocood commented Apr 14, 2020

LGTM

1 similar comment
@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT2 Indicates that a PR has LGTM 2. label Apr 14, 2020
@zz-jason
Copy link
Member

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 14, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 14, 2020

Your auto merge job has been accepted, waiting for 16175, 16347, 15859

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 14, 2020

/run-all-tests

@sre-bot sre-bot merged commit 6458006 into pingcap:release-3.0 Apr 14, 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/planner SIG: Planner 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. type/bugfix This PR fixes a bug. type/enhancement The issue or PR belongs to an enhancement. type/performance type/3.0-cherry-pick

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants