[ 
https://issues.apache.org/jira/browse/AIRFLOW-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16768162#comment-16768162
 ] 

jack commented on AIRFLOW-3039:
-------------------------------

Can you open a PR for this?

> TriggerDagRunOperator raise error when triggered concurrently 
> --------------------------------------------------------------
>
>                 Key: AIRFLOW-3039
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3039
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DagRun
>    Affects Versions: 1.9.0
>         Environment: Linux, mysql, local executor
>            Reporter: Linxiao Bai
>            Priority: Critical
>
> The error is caused by multiple independent TriggerDagRunOperator tasks 
> pointing to the same dag. 
> When trigger concurrently, a field in the transaction updating data to the 
> database have collision. this cause TirggerDagRunOperator to fail. but one 
> who makes it the first transaction will be success. 
> I was able to get around with the issue by adding:
> {code:java}
> import random
> import time
> time.sleep(random.randint(1, 60))
> {code}
>  before 
> {code:java}
> airflow.operators.dagrun_operator.TriggerDagRunOperator.execute
> {code}
>  
> as the first line. 
> The issue might be an executing_time related field has collision when update 
> to the database.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to