mridulm commented on code in PR #3239:
URL: https://github.com/apache/celeborn/pull/3239#discussion_r2071174660


##########
common/src/main/java/org/apache/celeborn/common/network/server/TransportChannelHandler.java:
##########
@@ -152,8 +153,18 @@ public void channelInactive(ChannelHandlerContext ctx) 
throws Exception {
 
   @Override
   public void channelRead(ChannelHandlerContext ctx, Object request) throws 
Exception {
-    if (request instanceof RequestMessage && !(request instanceof Heartbeat)) {
-      requestHandler.handle((RequestMessage) request);
+    if (request instanceof RequestMessage) {
+      if (request instanceof Heartbeat) {
+        logger.debug("Received heartbeat from {}.", 
NettyUtils.getRemoteAddress(ctx.channel()));
+        if (!enableHeartbeat) {
+          // Which disables heartbeat should send heartbeat for processing 
heartbeat to avoid
+          // reading idleness of which enables heartbeat.
+          requestHandler.processHeartbeat();

Review Comment:
   I was trying to understand if case 4 had corner cases. Makes sense, thanks 
for clarifying !



-- 
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]

Reply via email to