The TriggerSchedulerMonitor reports realtime triggers as locked Describe the issue The…
- User
The
TriggerSchedulerMonitorreports realtime triggers as lockedDescribe the issue
The
TriggerSchedulerMonitorreports realtime triggers as locked.[tenant: main] [namespace: company.team] [flow: realtime-kafka] [trigger: kafka] No execution found, schedule is blocked since '2026-04-27T13:38:23.415498Z'
But as those trigger will always be blocked without any executionID they will be reported indefinitly.
Environment
- Kestra Version: develop
Interface
No new interfaces are introduced.
- Assistant
Investigating how
TriggerSchedulerMonitorhandles realtime triggers so we can exclude them from locked-schedule reporting. - Assistant
Implementing the fix: realtime triggers stay locked on workers without a linked execution, so they shouldn't be monitored as blocked schedules.
- Assistant
Fixed.
TriggerSchedulerMonitorwas treating locked realtime triggers like schedule triggers that are waiting on an execution.Root cause: Realtime triggers are intentionally kept locked while running on a worker (see
processWorkerTriggerinTriggerScheduler.java). They don't have a linked execution in the repository the way schedule/polling triggers do, so the monitor always logged "No execution found, schedule is blocked" indefinitely.Fix: Skip
TriggerType.REALTIMEtriggers when monitoring locked triggers:triggers.stream() .filter(state -> !TriggerType.REALTIME.equals(state.getType())) .forEach(state ->Tests added in
TriggerSchedulerMonitorTest:shouldNotMonitorLockedRealtimeTrigger— verifies no execution lookup for realtime triggersshouldMonitorLockedScheduleTrigger— verifies schedule triggers are still monitored
Both tests pass.The fix is in and verified.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.