You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/28 10:43:12 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #1920: HIVE-24694: Early connection close to release server resources during creating

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org