Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
-
Reviewed
Description
In HBASE-17263,serverChannel add to allChannels,so NumOpenConnections exclude serverChannel from the count.
public NettyRpcServer(final Server server, final String name, final List<BlockingServiceAndInterface> services, final InetSocketAddress bindAddress, Configuration conf, RpcScheduler scheduler) throws IOException { super(server, name, services, bindAddress, conf, scheduler); ... try { serverChannel = bootstrap.bind(this.bindAddress).sync().channel(); LOG.info("NettyRpcServer bind to address=" + serverChannel.localAddress() + ", hbase.netty.rpc.server.worker.count=" + workerCount + ", useEpoll=" + useEpoll); allChannels.add(serverChannel); } catch (InterruptedException e) { throw new InterruptedIOException(e.getMessage()); } ... } @Override public int getNumOpenConnections() { // allChannels also contains the server channel, so exclude that from the count. return allChannels.size() - 1; }
In HBASE-17263,serverChannel not add to allChannels,so NumOpenConnections is one less than the actual.
public NettyRpcServer(Server server, String name, List<BlockingServiceAndInterface> services, InetSocketAddress bindAddress, Configuration conf, RpcScheduler scheduler) throws IOException { ... try { serverChannel = bootstrap.bind(this.bindAddress).sync().channel(); LOG.info("NettyRpcServer bind to address=" + serverChannel.localAddress()); } catch (InterruptedException e) { throw new InterruptedIOException(e.getMessage()); } ... }
In HBASE-21610, I think it's actually influenced by this bug.
Attachments
Issue Links
- links to