[
https://issues.apache.org/jira/browse/HIVE-24349?focusedWorklogId=508986&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-508986
]
ASF GitHub Bot logged work on HIVE-24349:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Nov/20 06:11
Start Date: 09/Nov/20 06:11
Worklog Time Spent: 10m
Work Description: aasha commented on a change in pull request #1655:
URL: https://github.com/apache/hive/pull/1655#discussion_r519571307
##########
File path:
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -798,14 +798,14 @@ public void close() {
// just in case, we make this call.
if ((transport != null) && transport.isOpen()) {
transport.close();
- final int newCount = connCount.decrementAndGet();
- LOG.info("Closed a connection to metastore, current connections: {}",
- newCount);
if (LOG.isTraceEnabled()) {
LOG.trace("METASTORE CONNECTION TRACE - close [{}]",
System.identityHashCode(this), new Exception());
}
}
+ final int newCount = connCount.decrementAndGet();
Review comment:
this should be done only if client is not null at the first place.
otherwise if you just keep calling close it will keep decrementing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 508986)
Time Spent: 20m (was: 10m)
> Client connection count is not printed correctly in HiveMetastoreClient
> -----------------------------------------------------------------------
>
> Key: HIVE-24349
> URL: https://issues.apache.org/jira/browse/HIVE-24349
> Project: Hive
> Issue Type: Bug
> Reporter: Arko Sharma
> Assignee: Arko Sharma
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-24349.01.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)