-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: fix load data losing connection when batch_dml_size is set (#22724) #22736
executor: fix load data losing connection when batch_dml_size is set (#22724) #22736
Conversation
/run-all-tests |
@guo-shaoge please accept the invitation then you can push to the cherry-pick pull requests. |
Signed-off-by: ti-srebot <[email protected]>
0a6d0f8
to
1b818fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lgtm |
/merge |
Sorry @XuHuaiyu, this branch's release version is in progress, please contact zhouqiang-cl,shuke987,jebter,you06 for more details. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 88b8ae1
|
@ti-srebot: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
cherry-pick #22724 to release-4.0
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr https://github.com/pingcap/tidb/pull/22736
After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Issue Number: Fix #22540
Problem Summary:
When tidb_dml_batch_size is a relatively small(eg: 128/64), load data into a table which has a auto_random column may got lost connection error.
What is changed and how it works?
What's Changed:
How it Works:
load data use two routine:
Commit routine will invalid txn after task is committed. And before generate a new txn, process stream routine may use that invalid txn to generate audo random value. So we add a lock to protect txn, make sure process stream routine use a valid txn.
Related changes
Check List
Tests
Side effects
Release note