jscheffl commented on code in PR #59239:
URL: https://github.com/apache/airflow/pull/59239#discussion_r2645764752
##########
airflow-core/src/airflow/models/trigger.py:
##########
@@ -399,7 +423,15 @@ def get_sorted_triggers(cls, capacity: int,
alive_triggerer_ids: list[int] | Sel
# picking up too many triggers and starving other triggerers for
HA setup.
remaining_capacity = min(remaining_capacity,
cls.max_trigger_to_select_per_loop)
- locked_query = with_row_locks(query.limit(remaining_capacity),
session, skip_locked=True)
+ # Filter by trigger_queues if the triggerer explicitly was called
with `--consume-trigger-queues`,
+ # otherwise, filter out Triggers which have an explicit
`trigger_queue` value since there may be other
+ # triggerer hosts explicitly assigned to that queue.
+ if consume_trigger_queues:
+ filtered_query =
query.filter(cls.trigger_queue.in_(consume_trigger_queues))
+ else:
+ filtered_query = query.filter(cls.trigger_queue.is_(None))
Review Comment:
Then one safety question: This query is fixed but the triggerer actually
does not know if there are other queue specific triggereres. Would mean this
has a deployment impact if I just want to have "one simple triggerer for all"
but I am using different queues in my executors?
(1) Would we need an option to ignore queues in triggerers and just "catch
all" for non-team separated setups?
(2) Otherwise if so then we need to add notes to all executors that might
use queues to ensure people are aware of this, else they wonder why their
triggerers get stuck after upgrading
--
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]