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/04/11 01:48:21 UTC

[GitHub] [incubator-doris] xinyiZzz commented on a diff in pull request #8925: [fix][mem tracker] Fix MemTracker null pointer in vectorized

xinyiZzz commented on code in PR #8925:
URL: https://github.com/apache/incubator-doris/pull/8925#discussion_r846892285


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -43,10 +43,11 @@ Status VOlapTableSink::init(const TDataSink& sink) {
 }
 
 Status VOlapTableSink::prepare(RuntimeState* state) {
+    RETURN_IF_ERROR(OlapTableSink::prepare(state));
     // Prepare the exprs to run.
     RETURN_IF_ERROR(vectorized::VExpr::prepare(_output_vexpr_ctxs, state, _input_row_desc,
                                                _expr_mem_tracker));
-    return OlapTableSink::prepare(state);
+    return Status::OK();

Review Comment:
   ![image](https://user-images.githubusercontent.com/13197424/162651593-5743ebbb-1eaa-465c-9518-253786a684dc.png)
   Changed location because `mem_tracker` is initialized in `OlapTableSink::prepare`.
   Testing found no effect on logic.



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