-
Notifications
You must be signed in to change notification settings - Fork 288
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
unit(dm): add Kill func for unit #4035
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #4035 +/- ##
================================================
+ Coverage 55.6402% 55.6696% +0.0294%
================================================
Files 494 507 +13
Lines 61283 63081 +1798
================================================
+ Hits 34098 35117 +1019
- Misses 23750 24458 +708
- Partials 3435 3506 +71 |
/run-dm-integration-tests |
@@ -972,7 +973,7 @@ func (s *Syncer) addJob(job *job) error { | |||
s.isTransactionEnd = false | |||
failpoint.Inject("checkCheckpointInMiddleOfTransaction", func() { | |||
s.tctx.L().Info("receive dml job", zap.Any("dml job", job)) | |||
time.Sleep(100 * time.Millisecond) | |||
time.Sleep(500 * time.Millisecond) |
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.
this is because my local computer run this case very fast, sleep 0.1 seconds will cause case failed sometimes
/unhold |
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.
weak suggestion: Close
having a parameter is strange to me, can we use Kill
or something?
EtcdServer
has Stop
and HardStop
ok i will add new interface func to unit called |
/run-dm-integration-tests |
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.
rest LGTM
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 603bf19
|
FAIL: server_test.go:2144: testMaster.TestGRPCLongResponse /run-leak-test |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created: #4604. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created: #4610. |
What problem does this PR solve?
Issue Number: close #3737
Root case of #3737
syncer
, syncer will try continue syncing until current trasaction endtiflow/dm/syncer/syncer.go
Line 1411 in abefe57
What is changed and how it works?
kill running subtasks when worker lost the keep-alive with dm-master (both for master offline or worker offline )
add Kill interface func to unit
impleament kill in syncer unit
change
worker.Close
toworker.Stop(graceful bool)
, when ungraceful stop, worker will callkillAllSubTasks
to force stop and this will cancel syncer.Run immediatelyonly when worker lost keepalive unit should call
Kill
Check List
Tests
Code changes
Side effects
Related changes
Release note