Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Sep 10, 2024
1 parent f1f25db commit e795dd1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
1 change: 1 addition & 0 deletions be/src/runtime/exec_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class ExecEnv {
}
std::shared_ptr<MemTrackerLimiter> stream_load_pipe_tracker() {
return _stream_load_pipe_tracker;
}
std::shared_ptr<MemTrackerLimiter> point_query_executor_mem_tracker() {
return _point_query_executor_mem_tracker;
}
Expand Down
9 changes: 0 additions & 9 deletions be/src/runtime/stream_load/stream_load_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,6 @@ class StreamLoadContext {

ByteBufferPtr schema_buffer() { return _schema_buffer; }

ByteBufferPtr schema_buffer() {
if (_schema_buffer == nullptr) {
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(
ExecEnv::GetInstance()->stream_load_pipe_tracker());
_schema_buffer = ByteBuffer::allocate(config::stream_tvf_buffer_size);
}
return _schema_buffer;
}

public:
static const int default_txn_id = -1;
// load type, eg: ROUTINE LOAD/MANUAL LOAD
Expand Down
10 changes: 5 additions & 5 deletions be/src/vec/common/allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ void Allocator<clear_memory_, mmap_populate, use_mmap, MemoryAllocator>::throw_b
}

#ifndef NDEBUG
template <bool clear_memory_, bool mmap_populate, bool use_mmap>
void Allocator<clear_memory_, mmap_populate, use_mmap>::add_address_sanitizers(void* buf,
size_t size) const {
template <bool clear_memory_, bool mmap_populate, bool use_mmap, typename MemoryAllocator>
void Allocator<clear_memory_, mmap_populate, use_mmap, MemoryAllocator>::add_address_sanitizers(
void* buf, size_t size) const {
#ifdef BE_TEST
if (!doris::ExecEnv::ready()) {
return;
Expand All @@ -222,8 +222,8 @@ void Allocator<clear_memory_, mmap_populate, use_mmap>::add_address_sanitizers(v
doris::thread_context()->thread_mem_tracker()->add_address_sanitizers(buf, size);
}

template <bool clear_memory_, bool mmap_populate, bool use_mmap>
void Allocator<clear_memory_, mmap_populate, use_mmap>::remove_address_sanitizers(
template <bool clear_memory_, bool mmap_populate, bool use_mmap, typename MemoryAllocator>
void Allocator<clear_memory_, mmap_populate, use_mmap, MemoryAllocator>::remove_address_sanitizers(
void* buf, size_t size) const {
#ifdef BE_TEST
if (!doris::ExecEnv::ready()) {
Expand Down
4 changes: 2 additions & 2 deletions be/src/vec/exec/scan/group_commit_scan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ 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;
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 e795dd1

Please sign in to comment.