-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-15243: [C++] fix for potential deadlock in the group-by node #33700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-15243: [C++] fix for potential deadlock in the group-by node #33700
Conversation
|
|
|
This is a spot fix. I suspect there are other potential issues in other nodes but we just don't have tests for them. #15253 is a more thorough fix but I don't believe it will be finished in time for the release. |
|
@github-actions crossbow submit test-ubuntu-18.04-cpp-static |
|
Revision: 20629be Submitted crossbow builds: ursacomputing/crossbow @ actions-681afd8c3f
|
| if (ErrorIfNotOk(Consume(ExecSpan(batch)))) return; | ||
|
|
||
| if (input_counter_.Increment()) { | ||
| ErrorIfNotOk(OutputResult()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't want to propagate the error back anymore? (I suppose that's all going away anyways?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, at the moment, the only thing that handles this error is the sink node and all it will do is trigger an abort which will end up coming back here and marking this finished anyways.
That used to be needed because it was the only way to trigger an abort on a failure.
Now, with the async scheduler, any failed task will trigger an abort. Furthemore, since finished_ is a "task" it will trigger the abort in this path.
| num_output_batches)); | ||
| Status st = | ||
| plan_->query_context()->StartTaskGroup(output_task_group_id_, num_output_batches); | ||
| if (st.IsCancelled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this if-else seems redundant, since OutputResult will MarkFinished even if we don't do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is translating a failed status into a successful status (the test expects a plan to succeed after calling StopProducing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The else condition propagates the failed status.
* Closes: #15243 Authored-by: Weston Pace <[email protected]> Signed-off-by: Weston Pace <[email protected]>
ExecPlanExecution.StressSourceGroupedSumStoptimeout #15243