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 80850200D01 for ; Fri, 22 Sep 2017 21:44:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7F3381609E6; Fri, 22 Sep 2017 19:44:08 +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 C45AE1609BE for ; Fri, 22 Sep 2017 21:44:07 +0200 (CEST) Received: (qmail 91379 invoked by uid 500); 22 Sep 2017 19:44:06 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 91370 invoked by uid 99); 22 Sep 2017 19:44:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Sep 2017 19:44:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4659D1A293C for ; Fri, 22 Sep 2017 19:44:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id VaACLa6Vl1UL for ; Fri, 22 Sep 2017 19:44:05 +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 4EF195FB6F for ; Fri, 22 Sep 2017 19:44:05 +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 B2CFAE0E4A for ; Fri, 22 Sep 2017 19:44:03 +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 AB51124215 for ; Fri, 22 Sep 2017 19:44:01 +0000 (UTC) Date: Fri, 22 Sep 2017 19:44:01 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRFLOW-1627) SubDagOperator initialization should only query pools when necessary MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 22 Sep 2017 19:44:08 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-1627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176995#comment-16176995 ] ASF subversion and git services commented on AIRFLOW-1627: ---------------------------------------------------------- Commit 516ace82c4ce3517196973829c06a396336b823c in incubator-airflow's branch refs/heads/v1-9-test from [~dxhuang] [ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=516ace8 ] [AIRFLOW-1627] Only query pool in SubDAG init when necessary When checking for pool conflicts in a SubDAG, ensure that a task in the SubDAG is actually in the same pool as the SubDagOperator itself to avoid querying the database unnecessarily. Closes #2620 from dhuang/AIRFLOW-1627 > SubDagOperator initialization should only query pools when necessary > -------------------------------------------------------------------- > > Key: AIRFLOW-1627 > URL: https://issues.apache.org/jira/browse/AIRFLOW-1627 > Project: Apache Airflow > Issue Type: Improvement > Components: operators, subdag > Reporter: Daniel Huang > Assignee: Daniel Huang > Priority: Minor > Fix For: 1.9.0 > > > If a SubDagOperator is assigned to a pool, it queries db for pool info to ensure there is no pool conflict with one of its tasks when only 1 slot remains. However, we should check that there's a possible conflict (a task in the subdag is in the same pool as the subdag) before actually querying for pools. > I have a DAG with hundreds of subdags and I found that the pool conflict check was taking up a fair chunk of time when processing the DAG file. > Relevant code: https://github.com/apache/incubator-airflow/blob/a81c153cc48e4c99a9e0a5047990b84c5d07e3cb/airflow/operators/subdag_operator.py#L60-L81 -- This message was sent by Atlassian JIRA (v6.4.14#64029)