You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/11/16 06:52:11 UTC

[hbase] branch master updated: HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new d7c4447dd2c HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)
d7c4447dd2c is described below

commit d7c4447dd2c14bec591597a74f043b36f35bd6a3
Author: mrzhao <im...@qq.com>
AuthorDate: Wed Nov 16 14:51:55 2022 +0800

    HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java
index 4b8aa28ad12..a79941e4a7b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java
@@ -232,9 +232,7 @@ public class NettyRpcServer extends RpcServer {
 
   @Override
   public int getNumOpenConnections() {
-    int channelsCount = allChannels.size();
-    // allChannels also contains the server channel, so exclude that from the count.
-    return channelsCount > 0 ? channelsCount - 1 : channelsCount;
+    return allChannels.size();
   }
 
   private void initSSL(ChannelPipeline p, boolean supportPlaintext)