[ 
https://issues.apache.org/jira/browse/HIVE-24694?focusedWorklogId=543561&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-543561
 ]

ASF GitHub Bot logged work on HIVE-24694:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/21 10:43
            Start Date: 28/Jan/21 10:43
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on a change in pull request #1920:
URL: https://github.com/apache/hive/pull/1920#discussion_r565991791



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -357,6 +357,15 @@ public HiveConnection(String uri, Properties info) throws 
SQLException {
           }
 
           if (numRetries >= maxRetries) {
+            try {

Review comment:
       I was looking around and made the following notices:
   * this check only occurs right before we throw the exception out
   * what will happen with opened connection in between retries?
   * it seems to me that `openTransport` does a check on the transport that is 
open or not - but it creates a new transport anyway; so I assume the driver 
will open a fresh connection for every try
   
   I'm thinking the following:
   * what do you think about closing the connection after a failed attempt?




----------------------------------------------------------------
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: 543561)
    Time Spent: 20m  (was: 10m)

> Early connection close to release server resources during creating
> ------------------------------------------------------------------
>
>                 Key: HIVE-24694
>                 URL: https://issues.apache.org/jira/browse/HIVE-24694
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Zhihua Deng
>            Assignee: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If exception happens during we try to get the connection from HiveDriver,  
> the opened transport or session may leave unclosed as the connection returned 
> is null, we cannot call the close method to release the server 
> resources(threads, connection quota, etc.), this could make things more worse 
> if the user rearches the connection limit and retries... 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to