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

channelz: remove init logging #2373

Merged
merged 2 commits into from
Oct 12, 2018
Merged

channelz: remove init logging #2373

merged 2 commits into from
Oct 12, 2018

Conversation

lyuxuan
Copy link
Contributor

@lyuxuan lyuxuan commented Oct 11, 2018

fix #2335

@lyuxuan lyuxuan requested a review from menghanl October 11, 2018 18:03
@@ -35,4 +31,6 @@ type SocketOptionData struct {
// Getsockopt defines the function to get socket options requested by channelz.
// It is to be passed to syscall.RawConn.Control().
// Windows OS doesn't support Socket Option
func (s *SocketOptionData) Getsockopt(fd uintptr) {}
func (s *SocketOptionData) Getsockopt(fd uintptr) {
grpclog.Infof("Channelz: socket options are not supported on non-linux os and appengine.")
Copy link
Member

Choose a reason for hiding this comment

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

How often will this be invoked? We should wrap it in a sync.Once if it's frequent enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be invoked when user try to get socket option for a socket on a platform that's not supported. I think log it once may make it easy to be overlooked. Or we can do sync.Once(grpc.Warningf(...) to only log once but draw more attention?

@lyuxuan lyuxuan merged commit 5a2acb1 into grpc:master Oct 12, 2018
menghanl pushed a commit that referenced this pull request Apr 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider removing Channelz log during Init
2 participants