You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/03/13 03:01:24 UTC

[GitHub] [incubator-doris] acelyc111 commented on a change in pull request #5514: [BUG] fix memory limit failure and optimize memory usage in join stage

acelyc111 commented on a change in pull request #5514:
URL: https://github.com/apache/incubator-doris/pull/5514#discussion_r593548993



##########
File path: be/src/exec/hash_join_node.h
##########
@@ -174,6 +175,11 @@ class HashJoinNode : public ExecNode {
     // This is only used for debugging and outputting the left child rows before
     // doing the join.
     std::string get_probe_row_output_string(TupleRow* probe_row);
+
+    // _release_context_counter should be power of 2
+    // GCC will GCC will optimize the modulo operation to &(release_context_counter - 1)

Review comment:
       ```suggestion
       // GCC will optimize the modulo operation to &(release_context_counter - 1)
   ```

##########
File path: be/src/exec/hash_join_node.h
##########
@@ -174,6 +175,11 @@ class HashJoinNode : public ExecNode {
     // This is only used for debugging and outputting the left child rows before
     // doing the join.
     std::string get_probe_row_output_string(TupleRow* probe_row);
+
+    // _release_context_counter should be power of 2

Review comment:
       How about define it as `static constexpr int _release_context_counter = 1 << 5;` ?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org