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

mvcc/reader: scan versions from u64::max to start_ts in get_txn_commit_info #5062

Merged
merged 5 commits into from Jul 11, 2019

Conversation

@youjiali1995
Copy link
Contributor

youjiali1995 commented Jul 10, 2019

Signed-off-by: youjiali1995 zlwgx1023@gmail.com

What have you changed? (mandatory)

In optimistic transaction, we assume if txn_1.start_ts < txn_2.start_ts, txn_1.commit_ts < txn2.commit_ts, so if we seek a commit record whose start_ts is greater than the seeking start_ts,
we can stop.

But in pessimistic transaction, it's possible a txn with a small start_ts has a greater commit_ts than a txn with a greater start_ts, i.e., txn_1.commit_ts > txn_2.commit_ts > txn_2.start_ts > txn_1.start_ts. So scan versions from the latest to the start_ts to find the commit record.

Please NOTE that:

  • Do not assume reviewers understand the original issue

What are the type of the changes? (mandatory)

The currently defined types are listed below, please pick one of the types for this PR by removing the others:

  • Bug fix (change which fixes an issue)

How has this PR been tested? (mandatory)

Unit tests.

Does this PR affect documentation (docs) or release note? (mandatory)

No

Does this PR affect tidb-ansible update? (mandatory)

No

…t_info

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
@youjiali1995

This comment has been minimized.

Copy link
Contributor Author

youjiali1995 commented Jul 10, 2019

@coocood

This comment has been minimized.

Copy link
Contributor

coocood commented Jul 10, 2019

LGTM

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
…1995/tikv into fix-get-txn-commit-info-in-pess
Copy link
Member

zhangjinpeng1987 left a comment

LGTM

@zhangjinpeng1987

This comment has been minimized.

Copy link
Member

zhangjinpeng1987 commented Jul 11, 2019

@AndreMouche AndreMouche merged commit 1cf0ab9 into tikv:master Jul 11, 2019
2 checks passed
2 checks passed
DCO All commits are signed off!
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details
@youjiali1995 youjiali1995 deleted the youjiali1995:fix-get-txn-commit-info-in-pess branch Jul 11, 2019
youjiali1995 added a commit to youjiali1995/tikv that referenced this pull request Jul 11, 2019
youjiali1995 added a commit to youjiali1995/tikv that referenced this pull request Jul 11, 2019
youjiali1995 added a commit to youjiali1995/tikv that referenced this pull request Jul 11, 2019
@overvenus overvenus mentioned this pull request Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.