-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 configs to specify keepAlive and shutdownTimeout for GrpcQueryClient #13546
Conversation
565f80e
to
bb4b271
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13546 +/- ##
============================================
+ Coverage 61.75% 62.12% +0.37%
+ Complexity 207 198 -9
============================================
Files 2436 2558 +122
Lines 133233 140916 +7683
Branches 20636 21866 +1230
============================================
+ Hits 82274 87543 +5269
- Misses 44911 46741 +1830
- Partials 6048 6632 +584
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pinot-common/src/main/java/org/apache/pinot/common/config/GrpcConfig.java
Outdated
Show resolved
Hide resolved
// KeepAlive configs | ||
private static final String CONFIG_CHANNEL_KEEP_ALIVE_ENABLED = "channelKeepAliveEnabled"; | ||
// To control keep alive on no usage | ||
private static final boolean DEFAULT_CHANNEL_KEEP_ALIVE_ENABLED = false; | ||
|
||
private static final String CONFIG_CHANNEL_KEEP_ALIVE_TIME_SECONDS = "channelKeepAliveTimeSeconds"; | ||
private static final int DEFAULT_CHANNEL_KEEP_ALIVE_TIME_SECONDS = 300; // 5 minutes |
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.
Consider merging this 2? Basically enabling keep alive is equivalent to setting the keep alive time to a positive value
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.
Updated the PR to keep default value as -1 to indiciate disabled. Users will need to set to > 0 to enable the feature.
pinot-common/src/main/java/org/apache/pinot/common/config/GrpcConfig.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/config/GrpcConfig.java
Outdated
Show resolved
Hide resolved
52ceccd
to
b464d6d
Compare
…ent. - Added `channelShutdownTimeoutSecond` config for `GrpcQueryClient` with default of 10s. - Added configs for keep-alive: - `channelKeepAliveEnabled` to enable/disable the feature, default false. - `channelKeepAliveTimeiSeconds` to configures the interval for sending keep-alive pings, default 300 seconds (5 minutes). - `channelKeepAliveTimeoutSeconds` configures the timeout for waiting for a ping acknowledgment, default 300 seconds (5 minutes). - `channelKeepAliveWithoutCalls` ensures pings are sent even when there are no active calls, keeping the connection alive during idle period, default true.
Added configs to specify keepAlive and shutdownTimeout for
GrpcQueryClient
.channelShutdownTimeoutSecond
config forGrpcQueryClient
with default of 10s.channelKeepAliveEnabled
to enable/disable the feature, default false.channelKeepAliveTimeSeconds
to configures the interval for sending keep-alive pings, default 300 seconds (5 minutes).channelKeepAliveTimeoutSeconds
configures the timeout for waiting for a ping acknowledgment, default 300 seconds (5 minutes).channelKeepAliveWithoutCalls
ensures pings are sent even when there are no active calls, keeping the connection alive during idle period, default true.