Skip to content

IPC/COW fork fixes - #27

Merged
johnnyshields merged 11 commits into
mainfrom
ipc-cow-fixes
Nov 3, 2025
Merged

IPC/COW fork fixes#27
johnnyshields merged 11 commits into
mainfrom
ipc-cow-fixes

Conversation

@johnnyshields

@johnnyshields johnnyshields commented Nov 3, 2025

Copy link
Copy Markdown
Contributor
  1. Dynamic Routing in Fork Contexts - output.to(:stage) now works correctly from within IPC and COW fork
    workers by encoding routing information in IPC messages
  2. Runtime Edge Tracking - Properly initializes and tracks dynamically created edges for correct END
    signal propagation
  3. Fork-Safe Result Collection - IPC/COW fork examples now correctly use temp files with file locking
    instead of trying to modify parent process memory

…sue in the process related to dynamic routing.

The core problem is that disconnected stages -- e.g. consumers with no upstream--will automatically shutdown instantly based on logic we added. See worker.rb line 60 (# If no upstream sources, this stage is disconnected)

If we remove this logic, these disconnected stages will never shut-down, unless they get a dynamic producer to connect to them (or their pipeline sends and send of stage?)

The solution is something like (A) allowing stages to be declared as disconnected: true, and (B) adding various keep-alive options for stages so they have a change to receive dynamic inputs before shutting down. A 3rd option (C) is to send Nonce signal (StageConnected) and/or KeepAlive signal to the stage initially, to declare the dynamic linkage. That might require some keepalive.

The yield example should be refactored to use connected stages
@johnnyshields
johnnyshields merged commit 4a8b427 into main Nov 3, 2025
19 of 36 checks passed
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