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 2022/09/07 11:22:55 UTC

[GitHub] [doris] mrhhsg commented on a diff in pull request #12437: [fix](agg) crash caused by failure of prepare

mrhhsg commented on code in PR #12437:
URL: https://github.com/apache/doris/pull/12437#discussion_r964722684


##########
be/src/vec/exec/vaggregation_node.cpp:
##########
@@ -499,11 +508,14 @@ Status AggregationNode::close(RuntimeState* state) {
     VExpr::close(_probe_expr_ctxs, state);
     if (_executor.close) _executor.close();
 
-    std::visit(
-            [&](auto&& agg_method) {
-                COUNTER_SET(_hash_table_size_counter, int64_t(agg_method.data.size()));
-            },
-            _agg_data._aggregated_method_variant);
+    /// _hash_table_size_counter may be null if prepare failed.
+    if (_hash_table_size_counter) {

Review Comment:
   Actually in function `Status FragmentMgr::exec_plan_fragment(const TExecPlanFragmentParams& params, FinishCallback cb)` when prepare was failed, the destructor of `PlanFragmentExecutor` will call `close`.



-- 
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: commits-unsubscribe@doris.apache.org

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