Skip to content

Commit d7c4447

Browse files
authored
HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)
Signed-off-by: Duo Zhang <[email protected]>
1 parent e5463e8 commit d7c4447

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
@@ -232,9 +232,7 @@ public void setSocketSendBufSize(int size) {
232232

233233
@Override
234234
public int getNumOpenConnections() {
235-
int channelsCount = allChannels.size();
236-
// allChannels also contains the server channel, so exclude that from the count.
237-
return channelsCount > 0 ? channelsCount - 1 : channelsCount;
235+
return allChannels.size();
238236
}
239237

240238
private void initSSL(ChannelPipeline p, boolean supportPlaintext)

0 commit comments

Comments
 (0)