kaxil edited a comment on pull request #13920: URL: https://github.com/apache/airflow/pull/13920#issuecomment-768390805
> I think creating but catching the integrity error is better - otherwise it's still prone to a race condition. > > (With the locking it shouldn't go on under normal circumstances, but it's More Correct to catch the integrity error instead and protects against more cases) I actually did start with that, but the problem is the session needs to be rollback'd all the way if we get an Integrity error and we need to update`next_dagrun` column in `_update_dag_next_dagruns`. Added the explanation in the code comments ---------------------------------------------------------------- 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]
