Skip to content

BUG FIX: Shut down relaunched cluster workers when the plan is stopped - #839

Open
Arthur031221 wants to merge 1 commit into
futureverse:developfrom
Arthur031221:fix-relaunched-worker-leak
Open

Arthur031221 wants to merge 1 commit into
futureverse:developfrom
Arthur031221:fix-relaunched-worker-leak

Conversation

@Arthur031221

@Arthur031221 Arthur031221 commented Oct 1, 2026 •

Copy link
Copy Markdown

After a cluster worker is cancelled and relaunched, switching to a sequential plan leaves its connection open. The backend holds the replacement node, but the cluster registry still holds the old one.

The registry now gets updated when a worker is relaunched, so shutting down the plan closes the replacement connection. Only clusters owned by the registry are updated.

Added a cancel/relaunch regression test. Tested with R CMD check --no-manual --as-cran future_1.76.0-9007.tar.gz.

Assisted by Claude/Codex.

@Arthur031221
Arthur031221 force-pushed the fix-relaunched-worker-leak branch from a378f8c to c0aa040 Compare October 7, 2026 06:03
@Arthur031221

Copy link
Copy Markdown
Author

Rebased onto develop and kept the new changelog entries. The worker-relaunch regression passes.

@Arthur031221
Arthur031221 force-pushed the fix-relaunched-worker-leak branch from c0aa040 to 0fd7384 Compare October 9, 2026 00:33
When a cluster worker is terminated (for example by cancel()) and then
relaunched, the new node was stored in the backend but not in the
cluster registry. stopCluster() then closed the old node and left the
relaunched worker process and its connection open until garbage
collection.
@Arthur031221
Arthur031221 force-pushed the fix-relaunched-worker-leak branch from 0fd7384 to 35e9f08 Compare October 10, 2026 05:29

This branch has not been deployed

No deployments
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