Skip to content

Scheduler: a worker can name itself, and a reconnect under that name ends its earlier connection - #3260

Open
amankrx wants to merge 1 commit into
TraceMachina:mainfrom
amankrx:scheduler/m3-worker-id
Open

amankrx wants to merge 1 commit into
TraceMachina:mainfrom
amankrx:scheduler/m3-worker-id

Conversation

@amankrx

@amankrx amankrx commented Nov 21, 2026

Copy link
Copy Markdown
Member

What and why

First step toward a worker keeping its running actions across a lost scheduler connection. Today the scheduler names every connection afresh, so a reconnected worker is a stranger and its actions run again. Nothing sends a name yet; the worker side comes later.

  • ConnectWorkerRequest.worker_id: the scheduler uses it as given, at most 256 bytes with no spaces or control characters. Empty, as from today's workers, keeps today's naming.
  • Each connection is stamped. A worker that reconnects under its id before its old stream's end is seen ends that connection, whose actions requeue as its disconnect would have; the old stream's late end then leaves the new connection alone.

How was this verified?

Service tests: a named worker is registered under its name; bad names are refused; a reconnect requeues the old connection's action and keeps the worker when the old stream ends, which fails without the stamp check. Scheduler, service, simulator and worker suites pass.

Risk

None for today's workers, which send no name. The protocol change is one optional field.

AI assistance

An agent drafted the change and I reviewed every line.

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Nov 21, 2026 1:51pm UTC
nativelink-aidm Ready Ready Preview Nov 21, 2026 1:51pm UTC

Request Review

This branch had an error being deployed

1 failed and 3 active deployments
Preview – nativelink — c26d60b6 Deployed Nov 21, 2026 by vercel[bot]
cluster-ci-aws — c26d60b6 Deployed Nov 21, 2026 by github-actions[bot] via Build shared Nix package #9691
Preview – nativelink-aidm — c26d60b6 Deployed Nov 21, 2026 by vercel[bot]
public-ci — c26d60b6 Deployed Nov 21, 2026 by amankrx via NativeLink / Linux (PR) #1046
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.

2 participants