You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/08 19:44:54 UTC

[GitHub] [arrow] westonpace commented on a diff in pull request #12845: ARROW-15718: [C++] Increase thread limit to work around thread issues

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


##########
cpp/src/arrow/compute/exec/hash_join.cc:
##########
@@ -103,7 +103,8 @@ class HashJoinBasicImpl : public HashJoinImpl {
     filter_ = std::move(filter);
     output_batch_callback_ = std::move(output_batch_callback);
     finished_callback_ = std::move(finished_callback);
-    local_states_.resize(num_threads + 1);  // +1 for calling thread + worker threads
+    // Adding ten, since each side of join might have an IO thread being called from.

Review Comment:
   Can you add `TODO(ARROW-15732)` to this comment so we know when to clean it up?



##########
cpp/src/arrow/compute/exec/hash_join.cc:
##########
@@ -103,7 +103,8 @@ class HashJoinBasicImpl : public HashJoinImpl {
     filter_ = std::move(filter);
     output_batch_callback_ = std::move(output_batch_callback);
     finished_callback_ = std::move(finished_callback);
-    local_states_.resize(num_threads + 1);  // +1 for calling thread + worker threads
+    // Adding ten, since each side of join might have an IO thread being called from.
+    local_states_.resize(num_threads + 10);

Review Comment:
   ```suggestion
       local_states_.resize(GetCpuThreadPoolCapacity() + io::GetIOThreadPoolCapacity() + 1);
   ```
   This is slightly less arbitrary than 10 and we'd have to be doing something truly weird to go over this value.



-- 
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