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/16 09:03:59 UTC

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

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



##########
File path: be/src/exec/hash_join_node.h
##########
@@ -174,6 +175,13 @@ 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 optimize the modulo operation to &(release_context_counter - 1)
+    // build_expr_context and probe_expr_context will free local alloc after this probe calculations
+    static constexpr int _release_context_counter = 1 << 5;

Review comment:
       static const variable should be UPPER.




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