-
Notifications
You must be signed in to change notification settings - Fork 727
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
*: add config gRPC service #2033
Conversation
3bd5c2f
to
c2d20e9
Compare
Codecov Report
@@ Coverage Diff @@
## master #2033 +/- ##
==========================================
- Coverage 76.79% 76.58% -0.21%
==========================================
Files 186 187 +1
Lines 19049 19092 +43
==========================================
- Hits 14628 14621 -7
- Misses 3305 3350 +45
- Partials 1116 1121 +5
Continue to review full report at Codecov.
|
@@ -129,6 +129,8 @@ type Config struct { | |||
|
|||
logger *zap.Logger | |||
logProps *log.ZapProperties | |||
|
|||
EnableConfigManager bool |
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 think we can enable it by default. No need the config. If no client use it, the feature has no side effect.
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 switch will also control the PD config management which will start a goroutine in #2049.
c2d20e9
to
db94a10
Compare
@@ -43,18 +45,29 @@ var ( | |||
errNotSupported = "not supported" | |||
) | |||
|
|||
// Server is the interface for configuration manager. |
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.
Does it seem that we have another interface called Server
? Maybe we should define the interface with some specifications.
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.
Yes, and actually we indeed have some interfaces called Server in different packages. Maybe we can handle it in the future. But I don't have a good idea.
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
LGTM |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
d7603f7
to
759005e
Compare
/run-all-tests |
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 |
/run-all-tests |
@rleungx merge failed. |
/merge |
/run-all-tests |
@rleungx merge failed. |
/merge |
/run-all-tests |
What problem does this PR solve?
Part of #1977. It should be reviewed after #2018 is merged.
What is changed and how it works?
This PR adds the config gRPC service. Also it adds
EnableConfigManager
in command line to decide whether we enable configuration manager.Check List
Tests