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 35B0A200B3B for ; Mon, 11 Jul 2016 20:00:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 34418160A5E; Mon, 11 Jul 2016 18:00:17 +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 7D665160A78 for ; Mon, 11 Jul 2016 20:00:16 +0200 (CEST) Received: (qmail 15537 invoked by uid 500); 11 Jul 2016 18:00:15 -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 15523 invoked by uid 99); 11 Jul 2016 18:00:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2016 18:00:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2C85EC7204 for ; Mon, 11 Jul 2016 18:00:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.507 X-Spam-Level: X-Spam-Status: No, score=-4.507 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bfTIykyK8hgw for ; Mon, 11 Jul 2016 18:00:14 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id A04875F24E for ; Mon, 11 Jul 2016 18:00:13 +0000 (UTC) Received: (qmail 12798 invoked by uid 99); 11 Jul 2016 18:00:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2016 18:00:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8DE2B2C02A3 for ; Mon, 11 Jul 2016 18:00:12 +0000 (UTC) Date: Mon, 11 Jul 2016 18:00:12 +0000 (UTC) From: "Arthur Wiedmer (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRFLOW-323) Should be able to prevent tasks from overlapping across multiple DAG Runs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 11 Jul 2016 18:00:17 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15371291#comment-15371291 ] Arthur Wiedmer commented on AIRFLOW-323: ---------------------------------------- Hi Isaac, it sounds like there are a couple of things that could help you : 1) You can set max_active_runs for the DAG to 1 to ensure that only one dag run is active at a time. In this case, only one dag run will be executed at a time. 2) You can set depend_on_past to True such that this task will not execute unless the previous one completes. 3) Finally, you can make this DAG use a pool with one slot, such that this task basically takes a lock on this particular resource. Though ideally, if several tasks are competing for the same resource, you might not want to schedule them at a cadence that will introduce contention... > Should be able to prevent tasks from overlapping across multiple DAG Runs > ------------------------------------------------------------------------- > > Key: AIRFLOW-323 > URL: https://issues.apache.org/jira/browse/AIRFLOW-323 > Project: Apache Airflow > Issue Type: Bug > Affects Versions: Airflow 1.7.1.2 > Environment: 1.7.1.2 > Reporter: Isaac Steele > Assignee: Isaac Steele > > As a the Airflow administrator, > If a task from a previous DAG Run is still running when the next scheduled run triggers the same task, there should be a way prevent the tasks from overlapping. > Otherwise the same code could end up running multiple times simultaneously. > To reproduce: > 1) Create a DAG with a short scheduled interval > 2) Create a task in that DAG to run longer than the interval > Result: Both tasks end up running that the same time. > This can cause tasks to compete for resources as well as duplicating or overwriting what the other task is doing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)