-
Notifications
You must be signed in to change notification settings - Fork 6k
executor, infoschema: add microservice into table cluster_info #51410
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
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51410 +/- ##
================================================
+ Coverage 70.6962% 72.7884% +2.0921%
================================================
Files 1461 1463 +2
Lines 434962 444168 +9206
================================================
+ Hits 307502 323303 +15801
+ Misses 108243 100599 -7644
- Partials 19217 20266 +1049
Flags with carried forward coverage won't be shown. Click here to find out more.
|
18388ba
to
d1bf544
Compare
Signed-off-by: Ryan Leung <[email protected]>
d1bf544
to
5946146
Compare
/test mysql-test |
@rleungx: The specified target(s) for
Use In response to this:
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. |
pkg/infoschema/tables.go
Outdated
// TSOServiceName is the name of TSO service. | ||
TSOServiceName = "tso" | ||
// SchedulingServiceName is the name of scheduling service. | ||
SchedulingServiceName = "scheduling" |
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.
Seems no need to be exported.
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.
Do we need to add more comments to indicate they are related to PD Micro Services?
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.
done
if err != nil { | ||
return nil, errors.Trace(err) | ||
} | ||
// TODO: maybe we should unify the PD API request interface. |
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 just removed the raw HTTP requests to PD from TiDB, I suggest it would be better to implement it directly by adding interfaces into the PD HTTP client.
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.
Maybe I can send another PR to replace them all.
Signed-off-by: Ryan Leung <[email protected]>
/test unit-test |
@rleungx: The specified target(s) for
Use In response to this:
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. |
return getMicroServiceServerInfo(ctx, schedulingServiceName) | ||
} | ||
|
||
func getMicroServiceServerInfo(ctx sessionctx.Context, serviceName string) ([]ServerInfo, error) { |
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.
Some of the code in this function and "GetPDServerInfo" have some of the same, do we need to do some simple unification?
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.
The decode and response handling are a little bit different.
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.
And I just extracted getEtcdMembers here.
Signed-off-by: Ryan Leung <[email protected]>
/retest |
1 similar comment
/retest |
Signed-off-by: Ryan Leung <[email protected]>
/test check-dev2 |
@rleungx: The specified target(s) for
Use In response to this:
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. |
Signed-off-by: Ryan Leung <[email protected]>
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CabinfeverB, xhebox, zimulala The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test fast_test_tiprow |
@rleungx: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
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. |
What problem does this PR solve?
Issue Number: close #51409.
Problem Summary:
What changed and how does it work?
Add TSO and scheduling server to table information_schema.cluster_info.
Check List
Tests
After this PR:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.