Skip to content

Commit 5baf7f1

Browse files
[refactor](loadmemlimit) remove load memlimit since it is never used (apache#39536)
It is needed to pick to branch 21, because we will depend on it to do spill disk. Co-authored-by: yiguolei <yiguolei@gmail.com>
1 parent 782973e commit 5baf7f1

File tree

5 files changed

+0
-26
lines changed

5 files changed

+0
-26
lines changed

be/src/runtime/runtime_state.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -463,15 +463,6 @@ Status RuntimeState::append_error_msg_to_file(std::function<std::string()> line,
463463
return Status::OK();
464464
}
465465

466-
int64_t RuntimeState::get_load_mem_limit() {
467-
// TODO: the code is abandoned, it can be deleted after v1.3
468-
if (_query_options.__isset.load_mem_limit && _query_options.load_mem_limit > 0) {
469-
return _query_options.load_mem_limit;
470-
} else {
471-
return _query_mem_tracker->limit();
472-
}
473-
}
474-
475466
void RuntimeState::resize_op_id_to_local_state(int operator_size) {
476467
_op_id_to_local_state.resize(-operator_size);
477468
}

be/src/runtime/runtime_state.h

-4
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,6 @@ class RuntimeState {
466466

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

469-
// get mem limit for load channel
470-
// if load mem limit is not set, or is zero, using query mem limit instead.
471-
int64_t get_load_mem_limit();
472-
473469
// local runtime filter mgr, the runtime filter do not have remote target or
474470
// not need local merge should regist here. the instance exec finish, the local
475471
// runtime filter mgr can release the memory of local runtime filter

be/src/vec/sink/writer/vtablet_writer.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ void VNodeChannel::_open_internal(bool is_incremental) {
413413

414414
request->set_num_senders(_parent->_num_senders);
415415
request->set_need_gen_rollup(false); // Useless but it is a required field in pb
416-
request->set_load_mem_limit(_parent->_load_mem_limit);
417416
request->set_load_channel_timeout_s(_parent->_load_channel_timeout_s);
418417
request->set_is_high_priority(_parent->_is_high_priority);
419418
request->set_sender_ip(BackendOptions::get_localhost());
@@ -1245,7 +1244,6 @@ Status VTabletWriter::_init(RuntimeState* state, RuntimeProfile* profile) {
12451244
_max_wait_exec_timer = ADD_TIMER(profile, "MaxWaitExecTime");
12461245
_add_batch_number = ADD_COUNTER(profile, "NumberBatchAdded", TUnit::UNIT);
12471246
_num_node_channels = ADD_COUNTER(profile, "NumberNodeChannels", TUnit::UNIT);
1248-
_load_mem_limit = state->get_load_mem_limit();
12491247

12501248
#ifdef DEBUG
12511249
// check: tablet ids should be unique

be/src/vec/sink/writer/vtablet_writer.h

-3
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,6 @@ class VTabletWriter final : public AsyncResultWriter {
660660
RuntimeProfile::Counter* _add_batch_number = nullptr;
661661
RuntimeProfile::Counter* _num_node_channels = nullptr;
662662

663-
// load mem limit is for remote load channel
664-
int64_t _load_mem_limit = -1;
665-
666663
// the timeout of load channels opened by this tablet sink. in second
667664
int64_t _load_channel_timeout_s = 0;
668665

fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java

-8
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,6 @@ private void executeOnce() throws Exception {
152152
curCoordinator.setExecMemoryLimit(execMemLimit);
153153
curCoordinator.setExecPipEngine(Config.enable_pipeline_load);
154154

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

165157
long leftTimeMs = getLeftTimeMs();

0 commit comments

Comments
 (0)