hani-fouladgar commented on code in PR #11295:
URL: https://github.com/apache/ozone/pull/11295#discussion_r4106823262
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/InterSCMGrpcProtocolService.java:
##########
@@ -57,9 +57,35 @@ public class InterSCMGrpcProtocolService {
this.port = conf.getInt(ScmConfigKeys.OZONE_SCM_GRPC_PORT_KEY,
ScmConfigKeys.OZONE_SCM_GRPC_PORT_DEFAULT);
+ final long maxConnectionIdle = conf.getTimeDuration(
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_MAX_CONNECTION_IDLE,
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_MAX_CONNECTION_IDLE_DEFAULT,
+ TimeUnit.MILLISECONDS);
+ final long keepAliveTime = conf.getTimeDuration(
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_KEEPALIVE_TIME,
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_KEEPALIVE_TIME_DEFAULT,
+ TimeUnit.MILLISECONDS);
+ final long keepAliveTimeout = conf.getTimeDuration(
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_KEEPALIVE_TIMEOUT,
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_KEEPALIVE_TIMEOUT_DEFAULT,
+ TimeUnit.MILLISECONDS);
+ final long permitKeepAliveTime = conf.getTimeDuration(
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_PERMIT_KEEPALIVE_TIME,
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_PERMIT_KEEPALIVE_TIME_DEFAULT,
+ TimeUnit.MILLISECONDS);
+ final boolean permitKeepAliveWithoutCalls = conf.getBoolean(
+ ScmConfigKeys.OZONE_SCM_HA_GRPC_SERVER_PERMIT_KEEPALIVE_WITHOUT_CALLS,
+ ScmConfigKeys
+ .OZONE_SCM_HA_GRPC_SERVER_PERMIT_KEEPALIVE_WITHOUT_CALLS_DEFAULT);
+
NettyServerBuilder nettyServerBuilder =
((NettyServerBuilder) ServerBuilder.forPort(port))
- .maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE);
+ .maxInboundMessageSize(OzoneConsts.OZONE_SCM_CHUNK_MAX_SIZE)
+ .maxConnectionIdle(maxConnectionIdle, TimeUnit.MILLISECONDS)
+ .keepAliveTime(keepAliveTime, TimeUnit.MILLISECONDS)
+ .keepAliveTimeout(keepAliveTimeout, TimeUnit.MILLISECONDS)
+ .permitKeepAliveTime(permitKeepAliveTime, TimeUnit.MILLISECONDS)
+ .permitKeepAliveWithoutCalls(permitKeepAliveWithoutCalls);
Review Comment:
Good catch — you're right. The client is never configured with
keepAliveWithoutCalls, so it only pings while the download RPC is active, and
permitKeepAliveWithoutCalls governs a case that never happens here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]