-
Notifications
You must be signed in to change notification settings - Fork 726
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
*: remove api mode concept #8952
Conversation
cb81d98
to
806f172
Compare
3c8d130
to
b2765f0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8952 +/- ##
==========================================
+ Coverage 74.91% 76.34% +1.42%
==========================================
Files 416 465 +49
Lines 42103 70550 +28447
==========================================
+ Hits 31543 53859 +22316
- Misses 7810 13344 +5534
- Partials 2750 3347 +597
Flags with carried forward coverage won't be shown. Click here to find out more. |
/retest |
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
@@ -116,7 +116,7 @@ func MicroserviceRedirectRule(matchPath, targetPath, targetServiceName string, | |||
} | |||
|
|||
func (h *redirector) matchMicroServiceRedirectRules(r *http.Request) (bool, string) { | |||
if !h.s.IsAPIServiceMode() { | |||
if !h.s.IsPDServiceMode() { |
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.
How about IsMicroServiceMode
?
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.
See the PR description.
pkg/mcs/scheduling/server/server.go
Outdated
@@ -220,7 +220,7 @@ func (s *Server) updateAPIServerMemberLoop() { | |||
// double check | |||
break | |||
} | |||
if s.cluster.SwitchAPIServerLeader(pdpb.NewPDClient(cc)) { | |||
if s.cluster.SwitchPDLeader(pdpb.NewPDClient(cc)) { |
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.
How about SwitchPDServiceLeader
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
// flagFromAPIServer has no influence for pd mode, but it is useful for us to debug in api mode. | ||
flagFromAPIServer = "from_api_server" | ||
// flagFromPDService has no influence for pd mode, but it is useful for us to debug in pd service mode. | ||
flagFromPDService = "from_api_server" |
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 change "from_api_server"?
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 didn't change it before because I'm afraid there is a compatibility issue. Since it is not GA now, I'm going to change it.
/hold |
@niubell PTAL |
/retest |
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JmPotato, lhy1024, niubell, okJiang 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 |
/retest |
/hold cancel |
What problem does this PR solve?
Issue Number: ref #8477
What is changed and how does it work?
This PR changes the following things:
pdService*
toservice*
in client, pd service can be used only in microservice mode.apiSvc*
andpdSvc*
in client and change the name toservice*
pd mode
andpd service mode
to distinguish whether PD is in microservice mode, previously we useapi*
Check List
Tests
Release note