Andrushika commented on code in PR #70128:
URL: https://github.com/apache/airflow/pull/70128#discussion_r3658776264


##########
airflow-core/src/airflow/assets/manager.py:
##########
@@ -65,6 +65,18 @@
 log = structlog.get_logger(__name__)
 
 
+def _sorted_by_dag_id(dags: Collection[DagModel]) -> list[DagModel]:

Review Comment:
   > I suggest using 
[`MutableSet`](https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableSet)
 for the hint.
   
   Simply `set[DagModel]` should be fine, I think we don't need `MutableSet` 
since there is no other input. We could avoid unnecessary abstraction here. 
What do you think?
   
    > I would expect tests of the wrapper to cover repeated values (could this 
deadlock if such input was possible?)
   
   Good question! It won't, since a deadlock only occurs when two transactions 
are both waiting for each other's lock release. Repeated values would all be 
within a single transaction, and a transaction never waits for its own locks.
   
   
   
   
   



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