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

*: read committed transaction gets a wrong snapshot with subquery #15471

Merged
merged 3 commits into from
Mar 19, 2020

Conversation

jackysp
Copy link
Member

@jackysp jackysp commented Mar 18, 2020

Signed-off-by: Shuaipeng Yu jackysp@gmail.com

What problem does this PR solve?

The early executed subquery consume the statement tso request and abandoned the executor after it executed, which makes the statement can not get the new tso instead of using the transaction start tso to read data.

What is changed and how it works?

Make refreshForUpdateTSForRC assign a new snapshot tso no matter the statement tso request is nil or not.

Check List

Tests

  • Unit test

Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
@jackysp jackysp added type/bugfix This PR fixes a bug. sig/transaction SIG:Transaction labels Mar 18, 2020
@jackysp jackysp requested a review from a team as a code owner March 18, 2020 13:38
@ghost ghost requested review from qw4990 and XuHuaiyu and removed request for a team March 18, 2020 13:38
@jackysp jackysp requested review from cfzjywxk, coocood and a team March 18, 2020 13:39
@ghost ghost removed their request for review March 18, 2020 13:39
@jackysp jackysp removed request for qw4990 and XuHuaiyu March 18, 2020 13:39
@github-actions github-actions bot added the sig/execution SIG execution label Mar 18, 2020
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
@codecov
Copy link

codecov bot commented Mar 18, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@86d8e16). Click here to learn what that means.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master     #15471   +/-   ##
===========================================
  Coverage          ?   80.3791%           
===========================================
  Files             ?        502           
  Lines             ?     133832           
  Branches          ?          0           
===========================================
  Hits              ?     107573           
  Misses            ?      17814           
  Partials          ?       8445

@cfzjywxk
Copy link
Contributor

LGTM

1 similar comment
@coocood
Copy link
Member

coocood commented Mar 19, 2020

LGTM

@jackysp
Copy link
Member Author

jackysp commented Mar 19, 2020

/merge

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

sre-bot commented Mar 19, 2020

/run-all-tests

@sre-bot sre-bot merged commit 7e570b1 into pingcap:master Mar 19, 2020
@you06 you06 added this to the v4.0.0-rc milestone Mar 27, 2020
@jackysp jackysp deleted the fix_rc_subquery branch November 25, 2020 03:03
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. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants