Skip to content

Wait for gateway unregistration before stopping - #4505

Merged
un-def merged 2 commits into
masterfrom
issue_4493_wait_for_unregistration
Nov 25, 2026
Merged

un-def merged 2 commits into
masterfrom
issue_4493_wait_for_unregistration

Conversation

@un-def

@un-def un-def commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

A terminating service replica was stopped regardless of whether gateway replicas had unregistered it. They sync every 15 seconds, so unregistration could land up to 16 seconds into the replica's 30-second termination deadline, cutting requests still routed to it.

The terminating pipeline now waits until no running gateway replica has the job registered before stopping it, and asks the gateway replicas to sync right away. The wait is capped at a minute (JobModel.unregister_deadline), since an unreachable gateway replica never unregisters anything. Aborted jobs are not waited for.

Part-of: #4493
Assisted-by: Claude Opus 5.5 noreply@anthropic.com

A terminating service replica was stopped regardless of whether
gateway replicas had unregistered it. They sync every 15 seconds, so
unregistration could land up to 16 seconds into the replica's 30-second
termination deadline, cutting requests still routed to it.

The terminating pipeline now waits until no running gateway replica
has the job registered before stopping it, and asks the gateway
replicas to sync right away. The wait is capped at a minute
(`JobModel.unregister_deadline`), since an unreachable gateway replica
never unregisters anything. Aborted jobs are not waited for.

Part-of: #4493
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@un-def
un-def requested a review from jvstme November 20, 2026 15:32
@un-def
un-def merged commit 7c326f8 into master Nov 25, 2026
26 checks passed
@un-def
un-def deleted the issue_4493_wait_for_unregistration branch November 25, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant