Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor](loadmemlimit) remove load memlimit since it is never used #39536

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions be/src/runtime/runtime_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,6 @@ std::string RuntimeState::get_error_log_file_path() {
return _error_log_file_path;
}

int64_t RuntimeState::get_load_mem_limit() {
// TODO: the code is abandoned, it can be deleted after v1.3
if (_query_options.__isset.load_mem_limit && _query_options.load_mem_limit > 0) {
return _query_options.load_mem_limit;
} else {
return _query_mem_tracker->limit();
}
}

void RuntimeState::resize_op_id_to_local_state(int operator_size) {
_op_id_to_local_state.resize(-operator_size);
}
Expand Down
4 changes: 0 additions & 4 deletions be/src/runtime/runtime_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,6 @@ class RuntimeState {

std::vector<TErrorTabletInfo>& error_tablet_infos() { return _error_tablet_infos; }

// get mem limit for load channel
// if load mem limit is not set, or is zero, using query mem limit instead.
int64_t get_load_mem_limit();

// local runtime filter mgr, the runtime filter do not have remote target or
// not need local merge should regist here. the instance exec finish, the local
// runtime filter mgr can release the memory of local runtime filter
Expand Down
2 changes: 0 additions & 2 deletions be/src/vec/sink/writer/vtablet_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ void VNodeChannel::_open_internal(bool is_incremental) {

request->set_num_senders(_parent->_num_senders);
request->set_need_gen_rollup(false); // Useless but it is a required field in pb
request->set_load_mem_limit(_parent->_load_mem_limit);
request->set_load_channel_timeout_s(_parent->_load_channel_timeout_s);
request->set_is_high_priority(_parent->_is_high_priority);
request->set_sender_ip(BackendOptions::get_localhost());
Expand Down Expand Up @@ -1244,7 +1243,6 @@ Status VTabletWriter::_init(RuntimeState* state, RuntimeProfile* profile) {
_max_wait_exec_timer = ADD_TIMER(profile, "MaxWaitExecTime");
_add_batch_number = ADD_COUNTER(profile, "NumberBatchAdded", TUnit::UNIT);
_num_node_channels = ADD_COUNTER(profile, "NumberNodeChannels", TUnit::UNIT);
_load_mem_limit = state->get_load_mem_limit();

#ifdef DEBUG
// check: tablet ids should be unique
Expand Down
3 changes: 0 additions & 3 deletions be/src/vec/sink/writer/vtablet_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,6 @@ class VTabletWriter final : public AsyncResultWriter {
RuntimeProfile::Counter* _add_batch_number = nullptr;
RuntimeProfile::Counter* _num_node_channels = nullptr;

// load mem limit is for remote load channel
int64_t _load_mem_limit = -1;

// the timeout of load channels opened by this tablet sink. in second
int64_t _load_channel_timeout_s = 0;
// the load txn absolute expiration time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,6 @@ protected void executeOnce() throws Exception {
curCoordinator.setQueryType(TQueryType.LOAD);
curCoordinator.setExecMemoryLimit(execMemLimit);

/*
* For broker load job, user only need to set mem limit by 'exec_mem_limit' property.
* And the variable 'load_mem_limit' does not make any effect.
* However, in order to ensure the consistency of semantics when executing on the BE side,
* and to prevent subsequent modification from incorrectly setting the load_mem_limit,
* here we use exec_mem_limit to directly override the load_mem_limit property.
*/
curCoordinator.setLoadMemLimit(execMemLimit);
curCoordinator.setMemTableOnSinkNode(enableMemTableOnSinkNode);
curCoordinator.setBatchSize(batchSize);

Expand Down
Loading