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

session: add test case for retrying union statement #15076

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

djshow832
Copy link
Contributor

What problem does this PR solve?

Add test case for #15050.

What is changed and how it works?

Just add some test cases to test retrying UNION and SHOW statements.

Check List

Tests

  • Unit test
  • Manual test

I did the same as #15050 and the log shows UNION statement is not retried.

[2020/03/01 18:12:15.574 +08:00] [WARN] [session.go:463] [sql] [conn=1] [label=general] [error="[kv:9007]Write conflict, txnStartTS=414989028796923904, conflictStartTS=414989031736606720, conflictCommitTS=414989031736606721, key={tableID=45, handle=120001} primary=[]byte(nil) [try again later]"] [txn="Txn{state=invalid}"]
[2020/03/01 18:12:15.574 +08:00] [WARN] [session.go:655] [retrying] [conn=1] [schemaVersion=36] [retryCnt=0] [queryNum=0] [sql=begin]
[2020/03/01 18:12:15.575 +08:00] [INFO] [2pc.go:1074] ["2PC clean up done"] [conn=1] [txnStartTS=414989028796923904]
[2020/03/01 18:12:15.575 +08:00] [WARN] [session.go:655] [retrying] [conn=1] [schemaVersion=36] [retryCnt=0] [queryNum=1] [sql="update test set id=id+1"]
[2020/03/01 18:12:15.575 +08:00] [WARN] [session.go:655] [retrying] [conn=1] [schemaVersion=36] [retryCnt=0] [queryNum=2] [sql=commit]

Code changes

N/A

Side effects

N/A

Related changes

N/A

Release note ( This release note applies to the parser PR pingcap/parser#755)

  • Fix the bug that goroutine leaks when retrying a transaction which contains UNION statement.

@djshow832 djshow832 added priority/release-blocker This issue blocks a release. Please solve it ASAP. component/session labels Mar 2, 2020
@djshow832 djshow832 requested a review from bb7133 March 2, 2020 15:15
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@djshow832
Copy link
Contributor Author

/run-unit-test

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

@djshow832
Copy link
Contributor Author

/run-unit-test

@lysu lysu added the status/LGT2 Indicates that a PR has LGTM 2. label Mar 2, 2020
@bb7133
Copy link
Member

bb7133 commented Mar 3, 2020

/run-all-tests

@bb7133 bb7133 merged commit f51cdef into pingcap:release-3.0 Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/session priority/release-blocker This issue blocks a release. Please solve it ASAP. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants