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

THRIFT-5240: Tweak the default go server connectivity check interval #2256

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,9 @@ main function:

thrift.ServerConnectivityCheckInterval = 0

Please be advised that due to a
[Go runtime bug](https://github.com/golang/go/issues/27707), currently
if this interval is set to a value too low (for example, 1ms), it might cause
excessive cpu overhead.

This feature is also only enabled on non-oneway endpoints.
2 changes: 1 addition & 1 deletion lib/go/thrift/simple_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var ErrAbandonRequest = errors.New("request abandoned")
// implementations can change its value to control the behavior.
//
// If it's changed to <=0, the feature will be disabled.
var ServerConnectivityCheckInterval = time.Millisecond
var ServerConnectivityCheckInterval = time.Millisecond * 5

/*
* This is not a typical TSimpleServer as it is not blocked after accept a socket.
Expand Down