This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b5ee484e35 [refactor](loadmemlimit) remove load memlimit since it is 
never used (#39536)
0b5ee484e35 is described below

commit 0b5ee484e35848fd888ed973dac215114523a144
Author: yiguolei <[email protected]>
AuthorDate: Mon Aug 19 11:01:49 2024 +0800

    [refactor](loadmemlimit) remove load memlimit since it is never used 
(#39536)
    
    ## Proposed changes
    
    It is needed to pick to branch 21, because we will depend on it to do
    spill disk.
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/runtime/runtime_state.cpp                                 | 9 ---------
 be/src/runtime/runtime_state.h                                   | 4 ----
 be/src/vec/sink/writer/vtablet_writer.cpp                        | 2 --
 be/src/vec/sink/writer/vtablet_writer.h                          | 3 ---
 .../main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java  | 8 --------
 5 files changed, 26 deletions(-)

diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp
index 7ccf73e2f0d..4930048ed80 100644
--- a/be/src/runtime/runtime_state.cpp
+++ b/be/src/runtime/runtime_state.cpp
@@ -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);
 }
diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h
index cae6c4e6403..f43d0a163df 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -437,10 +437,6 @@ public:
 
     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
diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp 
b/be/src/vec/sink/writer/vtablet_writer.cpp
index aaaf7722252..63aac46e506 100644
--- a/be/src/vec/sink/writer/vtablet_writer.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer.cpp
@@ -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());
@@ -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
diff --git a/be/src/vec/sink/writer/vtablet_writer.h 
b/be/src/vec/sink/writer/vtablet_writer.h
index 993f9781955..e7a89824ba3 100644
--- a/be/src/vec/sink/writer/vtablet_writer.h
+++ b/be/src/vec/sink/writer/vtablet_writer.h
@@ -661,9 +661,6 @@ private:
     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.
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java 
b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
index d30a5a53ed6..9b74f8718af 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
@@ -156,14 +156,6 @@ public class LoadLoadingTask extends LoadTask {
         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);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to