Repository navigation
Closed
Labels
area:corearea:data-aware-schedulingassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionskind:bugThis is a clearly a bugThis is a clearly a bug
Description
Apache Airflow version
main (development)
What happened
I have 16 dags which all update the same dataset. They're set to finish at the same time (when the seconds on the clock are 00). About three quarters of them behave as expected, but the other quarter fails with errors like:
[2022-07-21, 06:06:00 UTC] {standard_task_runner.py:97} ERROR - Failed to execute job 8 for task increment_source ((psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "dataset_dag_run_queue_pkey"
DETAIL: Key (dataset_id, target_dag_id)=(1, simple_dataset_sink) already exists.
[SQL: INSERT INTO dataset_dag_run_queue (dataset_id, target_dag_id, created_at) VALUES (%(dataset_id)s, %(target_dag_id)s, %(created_at)s)]
[parameters: {'dataset_id': 1, 'target_dag_id': 'simple_dataset_sink', 'created_at': datetime.datetime(2022, 7, 21, 6, 6, 0, 131730, tzinfo=Timezone('UTC'))}]
(Background on this error at: https://sqlalche.me/e/14/gkpj); 375)
I've prepaired a gist with the details: https://gist.github.com/MatrixManAtYrService/b5e58be0949eab9180608d0760288d4d
What you think should happen instead
All dags should succeed
How to reproduce
Summary: Unpause all of the dags which we expect to collide, wait two minutes. Some will have collided.
Operating System
docker/debian
Versions of Apache Airflow Providers
n/a
Deployment
Astronomer
Deployment details
astro dev start targeting commit: cff7d91
be sure to have pause in requirements.txt
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:corearea:data-aware-schedulingassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionskind:bugThis is a clearly a bugThis is a clearly a bug
Activity
MatrixManAtYrService commentedon Jul 21, 2022
This is described here: #24974
Maybe it's ok that the update failed--given that the downstream dag ran as desired--but I don't think it should cause the task to fail.
dstandish commentedon Jul 22, 2022
nice work!
MatrixManAtYrService commentedon Aug 8, 2022
Ran across this again (at least I think it's the same thing) with this dag:
This time I noticed that, with the LocalExecutor at least, there are messages regarding zombines in the scheduler log: