Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C0986200CAE for ; Wed, 21 Jun 2017 20:32:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BE702160BD5; Wed, 21 Jun 2017 18:32:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 37817160BD0 for ; Wed, 21 Jun 2017 20:32:52 +0200 (CEST) Received: (qmail 35541 invoked by uid 500); 21 Jun 2017 18:32:46 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 35526 invoked by uid 99); 21 Jun 2017 18:32:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2017 18:32:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0C795DFBDA; Wed, 21 Jun 2017 18:32:46 +0000 (UTC) From: kkhatua To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #858: DRILL-3640: Support JDBC Statement.setQueryTimeout(... Content-Type: text/plain Message-Id: <20170621183246.0C795DFBDA@git1-us-west.apache.org> Date: Wed, 21 Jun 2017 18:32:46 +0000 (UTC) archived-at: Wed, 21 Jun 2017 18:32:52 -0000 Github user kkhatua commented on a diff in the pull request: https://github.com/apache/drill/pull/858#discussion_r123330684 --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillStatementImpl.java --- @@ -422,6 +507,9 @@ public ResultSet getGeneratedKeys() throws SQLException { public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { throwIfClosed(); try { + if (timeoutTrigger != null) { --- End diff -- I'm submit the timeout trigger to the pool and counting on that trigger doing a query cancellation to do that. I don't think Drill supports executeUpdate, but as long as a query cancellation for updates does the rollback of the transaction, this should suffice. This worked well for large queries where the execute###() call was longer than the timeout period and allowed for the cancellation to do the interrupt. --- 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. ---