-
Notifications
You must be signed in to change notification settings - Fork 188
.*: fix bug that after execute pause-task the task may still running #644
Conversation
/run-all-tests |
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #644 +/- ##
================================================
- Coverage 57.8327% 57.7236% -0.1092%
================================================
Files 202 203 +1
Lines 20561 20515 -46
================================================
- Hits 11891 11842 -49
- Misses 7524 7526 +2
- Partials 1146 1147 +1 |
dm/worker/subtask.go
Outdated
@@ -462,6 +472,7 @@ func (st *SubTask) Resume() error { | |||
st.setStage(pb.Stage_Paused) | |||
return err | |||
} else if ctx.Err() != nil { | |||
st.setStage(pb.Stage_Paused) |
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.
I think this should not be set to pb.Stage_Paused
, see #589 (comment)
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.
ok, I remove this and add a comment e34ec49
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
/run-all-tests |
/run-all-tests |
tests/sharding/run.sh
Outdated
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \ | ||
"resume-task test"\ | ||
"\"result\": true" 3 | ||
# resume twice |
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.
Should we add a test to test stop-task
twice?
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.
add in ecd45e6
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
/run-all-tests |
/run-all-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.
LGTM
What problem does this PR solve?
fix issue #637 and #629
when executing pause task the task is not real paused, and then execute resume task, maybe the old unit is still process, and then will cause some problem.
What is changed and how it works?
pausing
andresuming
:pausing
, and update stage topaused
at the last.resuming
, and update stage torunning
at the last.fetchResult
should wait for the unit's process result.Check List
Tests