seanghaeli commented on code in PR #77087:
URL: https://github.com/apache/airflow/pull/77087#discussion_r4651705369


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1285,7 +1324,17 @@ def update_triggers(self, requested_trigger_ids: 
set[int]):
         )
 
         if new_trigger_ids:
-            workloads_to_create = self.build_trigger_workloads(new_trigger_ids)
+            now = time.monotonic()
+            ready_ids = {tid for tid in new_trigger_ids if 
self.failure_tracker.attempt_ready(tid, now)}
+            delayed = new_trigger_ids - ready_ids
+            if delayed:
+                log.info(
+                    "Triggers failed recently, re-creating them once their 
backoff has passed",

Review Comment:
   This logs on every loop for as long as a trigger waits. In a Breeze run with 
three watchers failing, it wrote about 150 of these lines in 150 s, more than 
half of the triggerer's output, while the watchers were only retried 6 times. 
Could it log once instead, when the failure sets the delay, with how long it 
will wait?



##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1285,7 +1324,17 @@ def update_triggers(self, requested_trigger_ids: 
set[int]):
         )
 
         if new_trigger_ids:
-            workloads_to_create = self.build_trigger_workloads(new_trigger_ids)
+            now = time.monotonic()
+            ready_ids = {tid for tid in new_trigger_ids if 
self.failure_tracker.attempt_ready(tid, now)}

Review Comment:
   Watchers on one stream only come back together when their counts match. In 
Breeze I added a third watcher to a failing stream after the other two had 
failed 8 times. From then on the stream was reopened 10 times in 150 s, by the 
new watcher alone or by the other two, never all three, and once the stream 
worked again they came back 7 to 8 s apart. Could they share one delay, or 
should we take that line out of the description and leave it for a follow-up?



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