executor: fix point get snapshot TS for pessimistic transaction. #11012
What problem does this PR solve?
Select for update use PointGet executor, the TS for the snapshot always use startTS, result in wrong result.
What is changed and how it works?
Set the snapshot TS to forUpdateTS if the point get locks the key.
@@ Coverage Diff @@ ## master #11012 +/- ## =============================================== - Coverage 81.0171% 80.952% -0.0652% =============================================== Files 418 418 Lines 89428 89264 -164 =============================================== - Hits 72452 72261 -191 - Misses 11739 11764 +25 - Partials 5237 5239 +2
Jul 1, 2019
16 checks passed
ci/circleci Your tests passed on CircleCI!Details
codecov/patch 100% of diff hit (target 0%)Details
codecov/project Absolute coverage decreased by -0.0651% but relative coverage increased by +18.9828% compared to 5fd7ed7Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.Details
idc-jenkins-ci-tidb/common-test job succeededDetails
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.Details
idc-jenkins-ci-tidb/mybatis-test job succeededDetails
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.Details
license/cla Contributor License Agreement is signed.Details
referenced this pull request
Jul 1, 2019
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews.