Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Stop triggerers stealing callback triggers from a live triggerer - #73075

Draft
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:fix/callback-trigger-alive-triggerer
Draft

Stop triggerers stealing callback triggers from a live triggerer#73075
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:fix/callback-trigger-alive-triggerer

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Trigger.get_sorted_triggers builds one SELECT each for callback, task-instance and asset triggers. The task and asset SELECTs only take triggers that are unassigned or owned by a dead triggerer; the callback SELECT had no such filter, so every triggerer reclaimed every callback trigger on every pass:

  • A callback trigger owned by a live, heartbeating triggerer is taken over and then cancelled on the original, with both triggerers free to repeat that on each other.
  • Reclaiming triggers it already owns burns the triggerer's per-loop selection budget ahead of the task and asset SELECTs.

The asset SELECT had the same defect until #65792 added the predicate there; callback was missed.

Behavior change

A callback trigger owned by a live triggerer is no longer reassigned, matching task and asset triggers.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

The callback branch of the trigger-assignment query was the only one without
the liveness predicate the task and asset branches carry, so every triggerer
reclaimed every callback trigger on each loop regardless of who owned it. In
an HA deployment that means a callback trigger is cancelled and restarted as
triggerers take turns claiming it, and the no-op reclaims of triggers the
triggerer already owns consume the per-loop selection budget that task and
asset triggers would otherwise get.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant