Skip to content

Commit 71f746a

Browse files
zhaomoranApache9
authored andcommitted
HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)
Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit d7c4447)
1 parent 2d038ed commit 71f746a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ public void setSocketSendBufSize(int size) {
218218

219219
@Override
220220
public int getNumOpenConnections() {
221-
int channelsCount = allChannels.size();
222-
// allChannels also contains the server channel, so exclude that from the count.
223-
return channelsCount > 0 ? channelsCount - 1 : channelsCount;
221+
return allChannels.size();
224222
}
225223

226224
@Override

0 commit comments

Comments
 (0)