xBis7 commented on code in PR #4044:
URL: https://github.com/apache/ozone/pull/4044#discussion_r1111876394
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/GrpcOzoneManagerServer.java:
##########
@@ -91,9 +97,15 @@ public void init(OzoneManagerProtocolServerSideTranslatorPB
omTranslator,
CertificateClient caClient) {
NettyServerBuilder nettyServerBuilder = NettyServerBuilder.forPort(port)
.maxInboundMessageSize(maxSize)
- .addService(new OzoneManagerServiceGrpc(omTranslator,
- delegationTokenMgr,
- omServerConfig));
+ .maxConnectionIdle(CLIENT_TIMEOUT_SECS, TimeUnit.SECONDS)
Review Comment:
@neils-dev I get that there is great advantage to keeping the client
connections open, instead of opening and closing them per request as hRPC does,
but IMHO there should be a long timeout. We can't keep resources occupied
forever if there isn't traffic for over 30 minutes.
If we were using `ManagedChannel`, every trasport connection would be closed
after 30 mins of inactivity as a default. With the `NettyServer` there is no
timeout and we are holding resources forever. I think we should also have a 30
min timeout per transport. If a client is idle for such time, we shouldn't keep
the connection open.
--
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]