Skip to content

SuperSorter: Don't set allDone if it's already set.#17238

Merged
cryptoe merged 1 commit intoapache:masterfrom
gianm:fix-ss-niloutput-race
Oct 4, 2024
Merged

SuperSorter: Don't set allDone if it's already set.#17238
cryptoe merged 1 commit intoapache:masterfrom
gianm:fix-ss-niloutput-race

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Oct 3, 2024

If there is no output at all, setAllDoneIfPossible can be called twice (once when the output partitions future resolves, and once when the batcher finishes). If the calls happen in that order, it would try to create nil output channels both times, resulting in a "Channel already set" error. This patch fixes that issue by having setAllDoneIfPossible return without doing anything if allDone is already set.

This fixes a race where, if there is no output at all, setAllDoneIfPossible
could be called twice (once when the output partitions future resolves, and
once when the batcher finishes). If the calls happen in that order, it would
try to create nil output channels both times, resulting in a "Channel already set"
error.
@gianm gianm added the Bug label Oct 3, 2024
@gianm gianm added this to the 31.0.0 milestone Oct 3, 2024
@cryptoe cryptoe merged commit b9634a8 into apache:master Oct 4, 2024
kfaraz pushed a commit to kfaraz/druid that referenced this pull request Oct 4, 2024
This fixes a race where, if there is no output at all, setAllDoneIfPossible
could be called twice (once when the output partitions future resolves, and
once when the batcher finishes). If the calls happen in that order, it would
try to create nil output channels both times, resulting in a "Channel already set"
error.
@gianm gianm deleted the fix-ss-niloutput-race branch October 4, 2024 16:49
kfaraz added a commit that referenced this pull request Oct 5, 2024
…) (#17251)

* SQL: Use regular filters for time filtering in subqueries. (#17173)
* RunWorkOrder: Account for two simultaneous statistics collectors. (#17216)
* DartTableInputSpecSlicer: Fix for TLS workers. (#17224)
* Upgrade avro - minor version (#17230)
* SuperSorter: Don't set allDone if it's already set. (#17238)
* Decoupled planning: improve join support (#17039)
---------
Co-authored-by: Gian Merlino <gianmerlino@gmail.com>
Co-authored-by: Abhishek Agarwal <1477457+abhishekagarwal87@users.noreply.github.com>
Co-authored-by: Zoltan Haindrich <kirk@rxd.hu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants