ghostbody commented on issue #8181: Duplicate key value violates unique constraint "task_instance_pkey" error URL: https://github.com/apache/airflow/issues/8181#issuecomment-611942814 We met another similar problem when using `RestApi` `POST /api/experimental/dags/<DAG_ID>/dag_runs` to trigger a DAG Run. However there is a unique key for `(dag_id, execution_date)` and `execution_date` is `timestamp` (i.e. ms) level. When trigger multi DAG Runs programatically, it's likely to get two DAG Runs with the same `execution_date` and `duplicate key error` will occur. I think `execution_date` is a decent but not a good design to identify the DAG Run's uniqueness. 🤔 In the other hand, the mysql `id` is more reasonable in some certain scenes.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
