You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing a new asynchronous notfier #57541 I noticed a blocking trigger on the Triggerer that blocked for about 2 to 4 seconds.
At first I thought it was a side effect of my new feature, but it's the same for all triggers when they need to communicate with the supervisor to receive a connection, a variable or something similar. You will also receive some warnings about it (see below). This only happens the first time a trigger is run on the trigger. Next time everything will look good and there will be no warning. That made me curious.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While testing a new asynchronous notfier #57541 I noticed a blocking trigger on the Triggerer that blocked for about 2 to 4 seconds.
At first I thought it was a side effect of my new feature, but it's the same for all triggers when they need to communicate with the supervisor to receive a connection, a variable or something similar. You will also receive some warnings about it (see below). This only happens the first time a trigger is run on the trigger. Next time everything will look good and there will be no warning. That made me curious.
I traced it to the initialization of
TriggerRunnerSupervisor.client()https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/jobs/triggerer_job_runner.py#L380 and the current implementation that handles requests coming in here https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/jobs/triggerer_job_runner.py#L388. The first request starts the client, which creates theClientand starts thein_process_api_server(), which callsCadwyn.__call__(),etc. This is a blocking call.Is this behavior intentional? This could lead to confusion about poorly written triggers.
Example logs
Frist trigger runs
Second trigger runs
Beta Was this translation helpful? Give feedback.
All reactions