kaxil commented on a change in pull request #5743: [AIRFLOW-5088][AIP-24] 
Persisting serialized DAG in DB for webserver scalability
URL: https://github.com/apache/airflow/pull/5743#discussion_r313965300
 
 

 ##########
 File path: airflow/api/common/experimental/delete_dag.py
 ##########
 @@ -45,6 +49,11 @@ def delete_dag(dag_id: str, keep_records_in_log: bool = 
True, session=None) -> i
         raise DagFileExists("Dag id {} is still in DagBag. "
                             "Remove the DAG file first: {}".format(dag_id, 
dag.fileloc))
 
+    # Scheduler removes DAGs without files from serialized_dag table every 
dag_dir_list_interval.
+    # There may be a lag, so explicitly removes serialized DAG here.
+    if DAGCACHED_ENABLED and SerializedDagModel.has_dag(dag_id):
+        SerializedDagModel.remove_dag(dag_id)
 
 Review comment:
   Updated in 
https://github.com/apache/airflow/pull/5743/commits/b814f8dfd9448ee3ceef2722c7f0291d8a680700

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to