-
Notifications
You must be signed in to change notification settings - Fork 188
DM-worker: add error abstraction in pb.ProcessError #297
Conversation
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
===========================================
Coverage 60.8069% 60.8069%
===========================================
Files 134 134
Lines 15615 15615
===========================================
Hits 9495 9495
Misses 5208 5208
Partials 912 912 |
/run-compatibility-test |
/run-compatibility-test pre_commit=ce5e03815c28789877c6941e98da2161a2dd1dbb |
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
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
dm/worker/subtask.go
Outdated
result := proto.Clone(st.result).(*pb.ProcessResult) | ||
if result != nil { | ||
for i := range result.Errors { | ||
result.Errors[i].Error = nil | ||
} | ||
} | ||
return result |
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.
these code is same with realRelayHolder.Result()
, how about define a funcion to do this?
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.
refined, PTAL
LGTM |
cherry pick to release-1.0 failed |
What problem does this PR solve?
Currently we use
pb.ProcessError
to pass error information among different components on the wire through gRPC, but the information includes error type and error message only, which is not very compatible with DM new error system.What is changed and how it works?
Add more fields into
pb.ProcessError
and make it possible to reconstruct a*terror.Error
object frompb.ProcessError
Check List
Tests
Code changes
Side effects
Related changes