Skip to content

fix: don't record an empty node name in NodeVmsWithLocalSnapshots#399

Open
Grant McCloskey (MushuEE) wants to merge 1 commit into
agent-substrate:mainfrom
MushuEE:fix/pause-empty-node-locality
Open

fix: don't record an empty node name in NodeVmsWithLocalSnapshots#399
Grant McCloskey (MushuEE) wants to merge 1 commit into
agent-substrate:mainfrom
MushuEE:fix/pause-empty-node-locality

Conversation

@MushuEE

Copy link
Copy Markdown
Collaborator

Fixes #397

When FinalizePausedStep runs after the assigned worker record has already been deleted, the node holding the local checkpoint is unknown and the step wrote NodeVmsWithLocalSnapshots: [""]. findFreeWorker treats any non-empty restriction list as a hard node filter, and no worker has an empty node name — so every subsequent resume of the affected actor fails with no free workers available, permanently, unless the caller discards state with boot=true.

Two guards:

  • Write side (FinalizePausedStep): only record the node name when it is known. An empty list means "no locality restriction", which keeps the actor schedulable — local checkpoints live on the node itself, so a shuffled retry can still land on the node that holds the data.
  • Read side (findFreeWorker): ignore empty entries in the restriction list, healing actor records already poisoned by the old write path without a data migration.

Includes unit tests for findFreeWorker's restriction handling (none existed). Existing pause/resume functional tests pass unchanged — the normal path (node known) still records the single-element list.

When FinalizePausedStep runs after the worker record is already gone,
the node holding the local checkpoint is unknown. Previously the step
wrote [""] into NodeVmsWithLocalSnapshots, which findFreeWorker treats
as a hard restriction no worker can satisfy - every subsequent resume
fails with 'no free workers available' and the actor is permanently
unschedulable short of boot=true.

Write side: only record the node when it is known; an empty list means
no locality restriction, so the scheduler can still place the actor
(local checkpoints live on the node, so a shuffled retry can land on
the node that holds it).

Read side: findFreeWorker ignores empty entries in the restriction
list, healing actor records already poisoned by the old write path
without a data migration.

Fixes agent-substrate#397
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.

Pause finalization can record an empty node name in NodeVmsWithLocalSnapshots, leaving the actor permanently unschedulable

1 participant