Repository navigation
fix: preserve local in-process channels across peer DSM detachment - #108
Merged
Merged
Conversation
mdashti
approved these changes
Oct 6, 2026
paradedb-github-bot
Bot
force-pushed
the
main
branch
from
October 6, 2026 20:27
22d0b73 to
59f2983
Compare
stuhood
force-pushed
the
stuhood.task-multiplex-race
branch
from
October 6, 2026 22:21
ffe17f9 to
028ea1f
Compare
stuhood
force-pushed
the
stuhood.task-multiplex-race
branch
from
October 6, 2026 22:40
028ea1f to
105b3ca
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.
Problem
In multi-stage distributed queries where tasks are multiplexed across fewer worker processes than logical tasks (e.g. 8 tasks on 7 workers), peer workers can finish quickly, exit, and drop their DSM senders. This causes the remaining worker's DSM receiver to observe detachment (
RecvBatchOutcome::Detached).Previously,
DrainHandle::detach_data_scopefailed all registered channel buffers upon DSM detachment. When a worker hosted both a local producer and consumer fragment communicating viaopen_local_partition_sink, this prematurely failed the local in-process channel with:Solution
this_proconDrainHandleto distinguish local in-process channels (sender_proc == this_proc) from remote DSM channels.detach_data_scopeandregister_data_channel, avoid failing local channels on DSM inbox detachment; local channels remain live until the local producer finishes.failed: Option<String>toChannelBufferRegistryso that fatal errors fromfail_scopecontinue to fail both local and remote channels.Drop for LocalDrainPartitionSinkto fail pending buffers if a local producer drops without callingfinish()(e.g. due to panic or task error).MppMesh::cancel_streamandDrainHandle::cancel_stream.