You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/06/07 13:25:06 UTC

[GitHub] [arrow] westonpace commented on a diff in pull request #35902: GH-35837: [C++] Acero will hang if StopProducing is called while backpressure is applied on the source node

westonpace commented on code in PR #35902:
URL: https://github.com/apache/arrow/pull/35902#discussion_r1221598762


##########
cpp/src/arrow/acero/source_node.cc:
##########
@@ -263,6 +263,22 @@ struct SourceNode : ExecNode, public TracedNode {
     to_finish.MarkFinished();
   }
 
+  Status StopProducing() override {
+    // GH-35837: ensure node is not paused
+    Future<> to_finish;
+    {
+      std::lock_guard<std::mutex> lg(mutex_);
+      if (!backpressure_future_.is_finished()) {

Review Comment:
   If the backpressure future is not finished then backpressure is currently applied.  It's basically...
   
   ```
   void ResumeProducing() {
     if (actually_paused) {
       ... // unpause
     }
   }
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org