Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

The TriggerSchedulerMonitor reports realtime triggers as locked Describe the issue The…

  1. User

    The TriggerSchedulerMonitor reports realtime triggers as locked

    Describe the issue

    The TriggerSchedulerMonitor reports 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.

  2. Assistant

    Investigating how TriggerSchedulerMonitor treats realtime triggers versus scheduled triggers.

  3. Assistant

    Implementing the fix: realtime triggers stay locked while listening, so the monitor shouldn't treat them as blocked schedules.

  4. Assistant

    Fixed. TriggerSchedulerMonitor was treating all locked triggers the same, but realtime triggers are intentionally locked while listening for events — they won't have an execution until something actually fires.

    Root cause

    In TriggerScheduler.processWorkerTrigger, realtime triggers are always locked when dispatched to a worker:

        private void processWorkerTrigger(Clock clock, TriggerState triggerState, TriggerEvaluationContext triggerEvaluationContext, WorkerTriggerInterface trigger) {
            final boolean mustBeLocked = trigger instanceof RealtimeTriggerInterface || !((AbstractTrigger) trigger).isAllowConcurrent();
            updateNextEvaluationDateAndGetOnSuccess(clock, triggerState, triggerEvaluationContext).ifPresent(state ->
            {
                try {
                    this.triggerWorkerJobPublisher.send(state, triggerEvaluationContext.trigger(), triggerEvaluationContext.flow(), triggerEvaluationContext.conditionContext());
                    state = state
                        .lastTriggeredDate(clock)
                        .locked(clock, mustBeLocked);
    

    The monitor then looked for an execution for every locked trigger and warned when none was found — which is correct for schedule triggers (locked because an execution was just created) but wrong for realtime triggers (locked while idle, waiting for events).

    Fix

    Skip TriggerType.REALTIME triggers in the monitor:

                triggers.forEach(state ->
                {
                    if (TriggerType.REALTIME.equals(state.getType())) {
                        return;
                    }
                    Optional<Execution> execution = this.executionRepository.findAllByTrigger(state).next().blockOptional();
    

    Tests

    Added TriggerSchedulerMonitorTest with three cases:

    • Locked realtime trigger → no execution lookup
    • Locked schedule trigger → execution lookup still happens
    • Mixed triggers → only non-realtime triggers are checked

    All three tests pass.The fix is in place and verified.

    TriggerSchedulerMonitor now skips TriggerType.REALTIME triggers, so idle realtime listeners no longer produce false "schedule is blocked" warnings. Three unit tests in TriggerSchedulerMonitorTest all pass.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.