dstandish commented on code in PR #46501:
URL: https://github.com/apache/airflow/pull/46501#discussion_r1944154822
##########
airflow/dag_processing/bundles/base.py:
##########
@@ -67,6 +70,10 @@ def initialize(self) -> None:
and allows for deferring expensive operations until that point in
time. This will
only be called when Airflow needs the bundle files on disk - some uses
only need
to call the `view_url` method, which can run without initializing the
bundle.
+
+ This method must be safe to call concurrently from different threads
or processes.
+ If the underlying implementation is not safe, the `lock` context
manager can be used to
+ ensure that only one thread or process is initializing the bundle at a
time.
Review Comment:
The language is a bit contradictory. On one hand you say that the method
_must be thread safe / concurrent safe_. But then you say, "if it is _not_
safe....". So, in reality I think you mean, it doesn't have to be safe, but if
it's not safe, must use the locking interface that you provide here.
--
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]