uranusjr opened a new pull request, #76002:
URL: https://github.com/apache/airflow/pull/76002

   Follow-up to @kaxil’s comments on #75943.
   
   The cleanup after creating asset-triggered or asset-gated runs deleted 
consumed `asset_dag_run_queue` rows by a range of event IDs. A DELETE waits on 
rows locked by another transaction instead of skipping them, so it could 
deadlock with a concurrent dequeue (e.g. through the API), and the database may 
abort the other side instead of the scheduler.
   
   The cleanup now deletes only rows the scheduler locked, by primary key in 
chunks to keep the bind parameter count bounded. Their events are still matched 
against consumed events with a subquery. A row skipped by the lock is left for 
whoever holds it, even if its event is consumed; it is cleaned up in a later 
scheduling loop if it remains.
   
   Also correct the docstring that claimed the event ID bound excludes every 
event queued after the lock was taken, rename the test covering skipped rows to 
match the new behavior, and drop issue references from test docstrings.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to