feat: port the shared-memory transport onto the WorkerChannel abstraction#28
Draft
mdashti wants to merge 2 commits into
Draft
feat: port the shared-memory transport onto the WorkerChannel abstraction#28mdashti wants to merge 2 commits into
mdashti wants to merge 2 commits into
Conversation
5b1d213 to
9e7210d
Compare
1728fb5 to
328e142
Compare
9e7210d to
992673d
Compare
The shm ring/DSM/mesh/framing core moves verbatim from the fork; the old WorkerTransport umbrella is gone, so the resolver hands out a channel and execute_task reads the rings per partition. The mesh is the no-gRPC transport, so it builds in both the grpc-on and grpc-off configs.
ShmWorkerChannel::coordinator_channel now ships each stage's SetPlanRequest to the worker proc that owns its task, as a SetPlan frame the worker takes with take_set_plan, so the embedder no longer routes plans out of band.
992673d to
ea63b5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports our shared-memory ("shm") transport onto the
WorkerChannelabstraction.It's the third layer: it stacks on the embedder-API PR (#29), which stacks on the transport-completion PR (#27). The base here is the embedder-API branch, so the diff is only
src/shm/*plus themod shmdeclaration and its two Cargo deps. The transport plugs in with no core changes, which is the point.What
src/shm/*(rings, DSM, mesh, framing) moves over verbatim. The oldShmMqWorkerTransport: WorkerTransport+ShmMqWorkerConnection: WorkerConnectionbecomeShmChannelResolver: ChannelResolver+ aShmWorkerChannel: WorkerChannel:execute_taskreads the rings keyed off the task;coordinator_channelis a no-op that drains its input, since pg_search delivers plans over DSM, not over the channel.Verified
The in-crate
in_processtest runs real distributed queries through the shm rings (gather, shuffle, early-cancel, producer-loss), 4/4 green in both feature configs, and it runs under the no-gRPC CI job inherited from the transport-completion PR.self_hostedis deferred and gated out; its no-gRPC-default role is the in-process transport's and its ring safety-net role is this test.Consumed by
pg_searchruns its MPP on this transport (paradedb#5448), which is what exercises it end to end.