-
Notifications
You must be signed in to change notification settings - Fork 287
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
dm: add TCP connection IO traffic statistics to sync stage status in OpenAPI response #11742
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @River2000i. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 kubernetes/test-infra repository. |
dm/config/subtask.go
Outdated
@@ -182,13 +182,13 @@ type SubTaskConfig struct { | |||
// one go runtime. | |||
// IOTotalBytes is used build TCPConnWithIOCounter and UUID is used to as a | |||
// key to let MySQL driver to find the right TCPConnWithIOCounter. | |||
UUID string `toml:"-" json:"-"` | |||
IOTotalBytes *atomic.Uint64 `toml:"-" json:"-"` | |||
UUID string `toml:"uuid" json:"uuid"` |
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 remember toml is used for passing task content, and json is used for logging. We don't need to log them?
Also please add unit tests to ensure atomic types has implemented these marshall functions without race
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 remember toml is used for passing task content, and json is used for logging. We don't need to log them?
Indeed, we don't need to add json tag for both uuid. json tag used for log and openapi response
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.
Also please add unit tests to ensure atomic types has implemented these marshall functions without race
nice catch! The atomic.Uint64
values can't be properly serialized to TOML format. How about we manually copy atomic
value like:b094cb4
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.
since atomic.Uint64
is not support marshall functions for toml like https://github.com/pingcap/tiflow/blob/master/dm/master/scheduler/worker.go#L282
we need to avoid (nil pointer)/(zero value) after covert subtaskconfig
to toml... @lance6716 Any suggestion for that?🤔
/ok-to-test |
/retest |
/retest-required |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #11742 +/- ##
================================================
+ Coverage 53.2223% 55.1634% +1.9410%
================================================
Files 213 1002 +789
Lines 17720 137428 +119708
================================================
+ Hits 9431 75810 +66379
- Misses 7686 56069 +48383
- Partials 603 5549 +4946 |
@River2000i: The following tests failed, say
Full PR test history. Your PR dashboard. 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 kubernetes/test-infra repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #11741
What is changed and how it works?
dm/proto/dmworker.proto
and regenerate bymake generate-protobuf
make dm_generate_openapi
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note