[ 
https://issues.apache.org/jira/browse/DRILL-8009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432993#comment-17432993
 ] 

ASF GitHub Bot commented on DRILL-8009:
---------------------------------------

rymarm commented on a change in pull request #2333:
URL: https://github.com/apache/drill/pull/2333#discussion_r734568806



##########
File path: 
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
##########
@@ -520,8 +520,12 @@ public SQLXML createSQLXML() throws SQLException {
 
   @Override
   public boolean isValid(int timeout) throws SQLException {
-    checkOpen();
-    return super.isValid(timeout);
+    if (timeout < 0) {

Review comment:
       We could be nicer, but there are 
[requirements](https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#isValid-int-)
 of JDBC interface:  
   
   > 
https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#isValid-int-




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> DrillConnectionImpl#isValid() doesn't correspond JDBC API
> ---------------------------------------------------------
>
>                 Key: DRILL-8009
>                 URL: https://issues.apache.org/jira/browse/DRILL-8009
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>            Reporter: Maksym Rymar
>            Assignee: Maksym Rymar
>            Priority: Major
>
> {{DrillConnectionImpl#isValid()}} doesn't correspond [Java JDBC API 
> documentation|https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#isValid(int)].
>  Current implementation doesn't do actual connection verify and doesn't cover 
> cases like drillbit termination and network issues.
> {{java.sql.Connection#isValid()}} (which extends {{DrillConnectionImpl}}) 
> widely used in JDBC connection pools like HikariCP and without right 
> implementation, Drill JDBC driver cannot be used with them, because 
> connections will keep alive forever.



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

Reply via email to