save-buffer commented on code in PR #13143:
URL: https://github.com/apache/arrow/pull/13143#discussion_r918350576
##########
cpp/src/arrow/compute/exec/source_node.cc:
##########
@@ -196,17 +186,16 @@ struct SourceNode : ExecNode {
void StopProducing() override {
std::unique_lock<std::mutex> lock(mutex_);
stop_requested_ = true;
+ if (!started_) finished_.MarkFinished();
Review Comment:
Yes, that's what I'm guarding against. Part 2 of the refactor will fix this
weirdness, but essentially if we encounter an error during `StartProducing`, we
call `StopProducing` of every node that has been started. These nodes then call
`StopProducing` on their inputs, which ends up propagating down to the
`SourceNode`.
Part2 will get rid of this `StopProducing` spam by having each node have an
`Abort` method which will be called once by the plan. Nodes will not be calling
`Abort` on each other.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]