drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkorukanti <...@git.apache.org>
Subject [GitHub] drill pull request #532: DRILL-4732: Update JDBC driver to use the new prepa...
Date Mon, 08 Aug 2016 05:10:30 GMT
Github user vkorukanti commented on a diff in the pull request:

    --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
    @@ -362,12 +364,33 @@ public PreparedStatement prepareStatement(String sql, int resultSetType,
                                                 int resultSetHoldability) throws SQLException
         try {
    -      DrillPrepareResult prepareResult = new DrillPrepareResult(sql);
    +      DrillRpcFuture<CreatePreparedStatementResp> respFuture = client.createPreparedStatement(sql);
    +      CreatePreparedStatementResp resp;
    +      try {
    +        resp = respFuture.get();
    +      } catch (InterruptedException e) {
    +        // Preserve evidence that the interruption occurred so that code higher up
    +        // on the call stack can learn of the interruption and respond to it if it
    +        // wants to.
    +        Thread.currentThread().interrupt();
    +        throw new SQLException( "Interrupted", e );
    --- End diff --
    This is a create prepared statement query. Even if the client receives a message after
the interrupt, the response is going to be a protobuf message (no DrillBufs). The query that
is executed on client side (`LIMIT 0` query) has definitive timeout and result buffers are
already released on server side (see `UserClientConnectionWrapper` in `PreparedStatementProvider`),
before preparing a response message to create prepare statement request.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message