anmolnar commented on a change in pull request #4125:
URL: https://github.com/apache/hbase/pull/4125#discussion_r832200131



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java
##########
@@ -114,47 +107,43 @@
 
   @Override
   protected void callTimeout(Call call) {
-    execute(eventLoop, () -> {
-      if (channel != null) {
-        channel.pipeline().fireUserEventTriggered(new CallEvent(TIMEOUT, 
call));
-      }
-    });
+    Channel channel = channelRef.get();
+    if (channel != null) {
+      channel.pipeline().fireUserEventTriggered(new CallEvent(TIMEOUT, call));
+    }
   }
 
   @Override
   public boolean isActive() {
-    return channel != null;
+    return channelRef.get() != null;
   }
 
   private void shutdown0() {
-    assert eventLoop.inEventLoop();
+    Channel channel = channelRef.get();
     if (channel != null) {
       channel.close();
-      channel = null;
+      channelRef.compareAndSet(channel, null);

Review comment:
       ack




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