ephraimbuddy commented on code in PR #68558:
URL: https://github.com/apache/airflow/pull/68558#discussion_r3412800776
##########
airflow-core/src/airflow/models/dagbag.py:
##########
@@ -117,9 +140,9 @@ def _get_dag(self, version_id: UUID | str, session:
Session) -> SerializedDAG |
# counting a single lookup as both a miss and a hit.
if self._use_cache:
with self._lock:
- if dag := self._dags.get(version_id):
+ if (cached := self._dags.get(version_id)) is not None:
stats.incr("api_server.dag_bag.cache_hit")
- return dag
+ return cached.dag
stats.incr("api_server.dag_bag.cache_miss")
Review Comment:
with the throttled revalidation, this is no longer a concern
--
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]