Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Sep 14, 2024
1 parent 1a9ca61 commit 41fed22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions be/src/exec/data_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ Status DataSink::create_data_sink(ObjectPool* pool, const TDataSink& thrift_sink
case TDataSinkType::GROUP_COMMIT_BLOCK_SINK: {
Status status = Status::OK();
DCHECK(thrift_sink.__isset.olap_table_sink);
#ifndef NDEBUG
DCHECK(state->get_query_ctx() != nullptr);
state->get_query_ctx()->query_mem_tracker->is_group_commit_load = true;
#endif
sink->reset(new vectorized::GroupCommitBlockSink(pool, row_desc, output_exprs, &status));
RETURN_IF_ERROR(status);
break;
Expand Down Expand Up @@ -349,6 +353,10 @@ Status DataSink::create_data_sink(ObjectPool* pool, const TDataSink& thrift_sink
case TDataSinkType::GROUP_COMMIT_BLOCK_SINK: {
Status status = Status::OK();
DCHECK(thrift_sink.__isset.olap_table_sink);
#ifndef NDEBUG
DCHECK(state->get_query_ctx() != nullptr);
state->get_query_ctx()->query_mem_tracker->is_group_commit_load = true;
#endif
sink->reset(new vectorized::GroupCommitBlockSink(pool, row_desc, output_exprs, &status));
RETURN_IF_ERROR(status);
break;
Expand Down
4 changes: 4 additions & 0 deletions be/src/exec/exec_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ Status ExecNode::create_node(RuntimeState* state, ObjectPool* pool, const TPlanN
return Status::OK();

case TPlanNodeType::GROUP_COMMIT_SCAN_NODE:
#ifndef NDEBUG
DCHECK(state->get_query_ctx() != nullptr);
state->get_query_ctx()->query_mem_tracker->is_group_commit_load = true;
#endif
*node = pool->add(new vectorized::GroupCommitScanNode(pool, tnode, descs));
return Status::OK();

Expand Down
4 changes: 0 additions & 4 deletions be/src/vec/exec/scan/group_commit_scan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ Status GroupCommitScanNode::get_next(RuntimeState* state, vectorized::Block* blo

Status GroupCommitScanNode::init(const TPlanNode& tnode, RuntimeState* state) {
RETURN_IF_ERROR(VScanNode::init(tnode, state));
#ifndef NDEBUG
DCHECK(state->get_query_ctx() != nullptr);
state->get_query_ctx()->query_mem_tracker->is_group_commit_load = true;
#endif
return state->exec_env()->group_commit_mgr()->get_load_block_queue(
_table_id, state->fragment_instance_id(), load_block_queue);
}
Expand Down

0 comments on commit 41fed22

Please sign in to comment.