jedcunningham commented on a change in pull request #21413:
URL: https://github.com/apache/airflow/pull/21413#discussion_r803220482



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1083,6 +1083,7 @@ def _schedule_dag_run(
         # TODO[HA]: Rename update_state -> schedule_dag_run, ?? something else?
         schedulable_tis, callback_to_run = 
dag_run.update_state(session=session, execute_callbacks=False)
         if dag_run.state in State.finished:
+            session.flush()  # to update the dag_run state

Review comment:
       It sure feels like if we miss a flush and get into a bad state, we need 
more to really solve this. We don't want a "one shot to calculate the next 
dagrun" scenario, right? Or am I missing something?




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