-
Notifications
You must be signed in to change notification settings - Fork 188
fix(load): stop goroutines after restore returned (#744) #747
Conversation
/run-all-tests tidb=v4.0.0 |
1 similar comment
/run-all-tests tidb=v4.0.0 |
Codecov Report
@@ Coverage Diff @@
## release-1.0 #747 +/- ##
==============================================
Coverage 57.8541% 57.8541%
==============================================
Files 166 166
Lines 16991 16991
==============================================
Hits 9830 9830
Misses 6204 6204
Partials 957 957 |
/run-all-tests tidb=v4.0.0 |
@@ -263,25 +263,21 @@ func isResumableError(err *pb.ProcessError) bool { | |||
return true | |||
} | |||
|
|||
switch err.Type { | |||
case pb.ErrorType_ExecSQL: |
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.
We should remove this ProcessError.Type
later because we have better code
, class
, etc. cc @GMHDBJD
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.
Will do it in #746 later
} | ||
|
||
for _, tc := range testCases { | ||
err := unit.NewProcessError(tc.errorType, tc.err) | ||
err := unit.NewProcessError(pb.ErrorType_UnknownError, tc.err) |
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 pb.ErrorType_UnknownError
should be removed later.
/run-all-tests tidb=v4.0.0 |
/run-all-tests tidb=v4.0.0 |
/run-all-tests tidb=v4.0.0 |
func statusProcessResult(pr *pb.ProcessResult) *pb.ProcessResult { | ||
if pr == nil { | ||
return nil | ||
} | ||
result := proto.Clone(pr).(*pb.ProcessResult) | ||
if result != nil { | ||
for i := range result.Errors { | ||
result.Errors[i].Error = nil | ||
if result.Errors[i].Error != nil { | ||
result.Errors[i].Msg = "" |
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.
now, our Msg
do not including error codes, class, etc.
update this line will change the response from
"errors": [
{
"Type": "UnknownError",
"msg": "TCPReader get relay event with error: ERROR 1236 (HY000): Could not find first log file name in binary log index file",
"error": null
}
],
to
"errors": [
{
"Type": "UnknownError",
"msg": "",
"error": {
"ErrCode": 10006,
"ErrClass": 1,
"ErrScope": 2,
"ErrLevel": 3,
"Message": "run table schema failed - dbfile ./dumped_data.task_single/db_single.tbl-schema.sql: execute statement failed: CREATE TABLE `tbl` (`c1` int(11) NOT NULL,`ct` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创 建时间',PRIMARY KEY (`c1`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;: Error 1067: Invalid default value for 'ct'",
"RawCause": "Error 1067: Invalid default value for 'ct'"
}
}
],
@WangXiangUSTC @GMHDBJD PTAL |
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 tidb=v4.0.0 |
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
query-status
.What problem does this PR solve?
fix #743
What is changed and how it works?
call
cancel
afterRestore
returned.Check List
Tests
Code changes
Related changes