The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix-71070-asset-partition-dedup has failed.
Run started by GitHub user anmolxlight (triggered by anmolxlight).

Head commit for run:
7bc084a0c585a72ab01c2234c9ade50f1b2d6058 / anmolxlight <[email protected]>
Deduplicate pending asset-partition dag runs without locking the Dag table

The previous fix for duplicate AssetPartitionDagRun rows serialized
find-or-create behind a lock on the target DagModel row (SQLite global
writer lock, or a Postgres/MySQL row-level lock), which contends with
unrelated scheduler work touching that Dag. Replace it with a unique
constraint on (target_dag_id, pending_partition_key): the database
itself rejects the losing INSERT on a race, and the loser catches the
IntegrityError and re-selects the winning row instead of raising. This
is lock-free and avoids taking a Dag-row lock for a resource (the APDR)
that has nothing to do with the Dag row itself.

pending_partition_key mirrors partition_key while created_dag_run_id is
null and is cleared once the dag run is created, since MySQL supports
neither partial nor filtered unique indexes.

Report URL: https://github.com/apache/airflow/actions/runs/30911820181

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to