[
https://issues.apache.org/jira/browse/HBASE-21610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606587#comment-17606587
]
Moran edited comment on HBASE-21610 at 9/19/22 12:55 PM:
---------------------------------------------------------
I found that NumConnection is one less than the real data。Maybe it's because
we're decrease one。
was (Author: mrzhao):
The NumOpenConnections should use nonServerChannels size,Instead of using the
current calculation which may lead to inaccuracy。
> numOpenConnections metric is set to -1 when zero server channel exist
> ---------------------------------------------------------------------
>
> Key: HBASE-21610
> URL: https://issues.apache.org/jira/browse/HBASE-21610
> Project: HBase
> Issue Type: Bug
> Components: metrics
> Affects Versions: 2.1.1, 2.0.3
> Reporter: Pankaj Kumar
> Assignee: Pankaj Kumar
> Priority: Minor
> Fix For: 3.0.0-alpha-1, 2.2.0, 2.1.2, 2.0.4
>
> Attachments: HBASE-21610.patch, HBASE-21610.patch, HBASE-21610.patch,
> HBASE-21610.patch, HBASE-21610.patch
>
>
> In NettyRpcServer, numOpenConnections metric is set to -1 when zero server
> channel exist.
> {code}
> @Override
> public int getNumOpenConnections() {
> // allChannels also contains the server channel, so exclude that from the
> count.
> return allChannels.size() - 1;
> }
> {code}
>
> We should not decrease the channel size by 1 when zero server channel exist.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)