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 09:19:38 UTC
[hbase] branch branch-2.5 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 branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 71f746acced HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)
71f746acced is described below
commit 71f746accedfb6138636caae48173bea147a0698
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>
(cherry picked from commit d7c4447dd2c14bec591597a74f043b36f35bd6a3)
---
.../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 a08d095d3fe..1c266d32f82 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
@@ -218,9 +218,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();
}
@Override