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 CEB52200C2A for ; Wed, 1 Mar 2017 08:34:26 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CD4DA160B70; Wed, 1 Mar 2017 07:34:26 +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 28F00160B85 for ; Wed, 1 Mar 2017 08:34:26 +0100 (CET) Received: (qmail 73546 invoked by uid 500); 1 Mar 2017 07:34:03 -0000 Mailing-List: contact issues-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 issues@drill.apache.org Received: (qmail 73191 invoked by uid 99); 1 Mar 2017 07:32:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2017 07:32:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 80D43189511 for ; Wed, 1 Mar 2017 07:32:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.547 X-Spam-Level: X-Spam-Status: No, score=-1.547 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Dk41vr3EdohN for ; Wed, 1 Mar 2017 07:32:50 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0C6625F254 for ; Wed, 1 Mar 2017 07:32:50 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 61F48E0A2B for ; Wed, 1 Mar 2017 07:32:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id EE0FA24166 for ; Wed, 1 Mar 2017 07:32:45 +0000 (UTC) Date: Wed, 1 Mar 2017 07:32:45 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5287) Provide option to skip updates of ephemeral state changes in Zookeeper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 01 Mar 2017 07:34:26 -0000 [ https://issues.apache.org/jira/browse/DRILL-5287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15889678#comment-15889678 ] ASF GitHub Bot commented on DRILL-5287: --------------------------------------- Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/758#discussion_r103624801 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java --- @@ -280,31 +284,39 @@ public void interrupted(final InterruptedException ex) { } } - QueryState updateEphemeralState(final QueryState queryState) { - switch (queryState) { + void updateEphemeralState(final QueryState queryState) { + // If query is already in zk transient store, ignore the transient state update option. + // Else, they will not be removed from transient store upon completion. + if (!inTransientStore && + !foreman.getQueryContext().getOptions().getOption(ExecConstants.QUERY_TRANSIENT_STATE_UPDATE)) { + return; + } + + switch (queryState) { case ENQUEUED: case STARTING: case RUNNING: case CANCELLATION_REQUESTED: transientProfiles.put(stringQueryId, getQueryInfo()); // store as ephemeral query profile. + inTransientStore = true; break; case COMPLETED: case CANCELED: case FAILED: try { transientProfiles.remove(stringQueryId); + inTransientStore = false; } catch(final Exception e) { logger.warn("Failure while trying to delete the estore profile for this query.", e); } - break; default: throw new IllegalStateException("unrecognized queryState " + queryState); } - return queryState; + return; --- End diff -- remove unnecessary return > Provide option to skip updates of ephemeral state changes in Zookeeper > ---------------------------------------------------------------------- > > Key: DRILL-5287 > URL: https://issues.apache.org/jira/browse/DRILL-5287 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.9.0 > Reporter: Padma Penumarthy > Assignee: Padma Penumarthy > Fix For: 1.10.0 > > > We put transient profiles in zookeeper and update state as query progresses and changes states. It is observed that this adds latency of ~45msec for each update in the query execution path. This gets even worse when high number of concurrent queries are in progress. For concurrency=100, the average query response time even for short queries is 8 sec vs 0.2 sec with these updates disabled. For short lived queries in a high-throughput scenario, it is of no value to update state changes in zookeeper. We need an option to disable these updates for short running operational queries. -- This message was sent by Atlassian JIRA (v6.3.15#6346)