Skip to content
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

v3rpc: online defrag toggles gRPC health server serving status #16836

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

chaochn47
Copy link
Member

@chaochn47 chaochn47 force-pushed the defrag_follow_up branch 4 times, most recently from 0d65345 to a53af18 Compare October 27, 2023 00:36
@chaochn47 chaochn47 marked this pull request as ready for review October 27, 2023 03:44
@chaochn47
Copy link
Member Author

cc @serathius

@chaochn47 chaochn47 force-pushed the defrag_follow_up branch 2 times, most recently from 65a95ef to 36059b5 Compare October 27, 2023 22:27
@chaochn47 chaochn47 changed the title v3rpc: run health notifier to listen on online defrag state change v3rpc: online defrag toggle gRPC health server serving status Oct 27, 2023
@chaochn47 chaochn47 changed the title v3rpc: online defrag toggle gRPC health server serving status v3rpc: online defrag toggles gRPC health server serving status Oct 27, 2023
@chaochn47 chaochn47 requested a review from serathius October 28, 2023 00:12
@chaochn47 chaochn47 requested a review from ahrtr October 29, 2023 01:04
type HealthNotifier interface {
StartServe()
StopServe(reason string)
type notifier interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The previous name HealthNotifier makes more sense than notifier, because it isn't defined inside package "health".

Overall this PR is a little over-engineering. Both (*maintenanceServer) Defragment and (*healthChecker) StopServe are in the same package api/v3rpc, we don't have to necessarily introduce or refine the interface for now.

Anyway, not a big deal for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other side, we should avoid the other extreme. Fact that structs are in single package doesn't mean that they should access all internal methods. Having a internal interface doesn't complicate code too much, but it clarifies the interned usage.

@ahrtr ahrtr merged commit 4701a71 into etcd-io:main Oct 29, 2023
27 checks passed
@chaochn47 chaochn47 deleted the defrag_follow_up branch October 29, 2023 16:13
tjungblu added a commit to tjungblu/etcd that referenced this pull request May 6, 2024
Backport from 3.6 in etcd-io#16836

Co-authored-by: Chao Chen <[email protected]>
Signed-off-by: Thomas Jungblut <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants