Admitted workloads are requeued too early when a worker disconnects An admitted workload…
- User
Admitted workloads are requeued too early when a worker disconnects
An admitted workload must remain ready during a temporary worker disconnect and be retried only after the configured worker-loss timeout. Reconnection with the same configuration must restore processing without affecting other connected workers.
Interface
No new interfaces are introduced.
- Assistant
Investigating how worker disconnects trigger workload requeuing and where the worker-loss timeout is applied.
- Assistant
Implementing the fix:
syncReservingRemoteStatesetsLastTransitionTimeon each sync, butSetAdmissionCheckStateonly applies it when the state changes—so long-running Ready workloads requeue immediately on disconnect. Updating heartbeat logic and adding tests. - Assistant
Reverting the lost-remote path change — it would loop forever. The heartbeat fix alone is sufficient.
- Assistant
Now adding unit tests for the heartbeat refresh behavior:
- Assistant
Fixing the lost-remote timeout to use the reconciler clock instead of wall time.
- Assistant
Note: Usage of
AGENTS.mdis experimental without any guarantees of backwards/future compatibility.Fixed the premature requeue of admitted MultiKueue workloads when a worker disconnects.
Root cause
LastTransitionTimeon the multikueue admission check is used to measure theworkerLostTimeoutgrace period after a worker connection is lost.syncReservingRemoteStatetried to refresh this timestamp on every successful sync with the reserving worker, butSetAdmissionCheckStateonly updatesLastTransitionTimewhen the state changes. For workloads already inReady, the timestamp stayed at when they first became admitted.If a workload had been admitted longer than
workerLostTimeout(default 15 minutes), a temporary disconnect caused immediate requeue instead of waiting the full grace period.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.