You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/06 07:51:32 UTC

[GitHub] [doris] englefly opened a new pull request, #10644: [enhancement] if pending bytes exceeded, vtableSink wait until pending bytes consumed or task was cancelled

englefly opened a new pull request, #10644:
URL: https://github.com/apache/doris/pull/10644

   # Proposed changes
   1. table_sink 在send block时检查 sink下所有nodeChannel的pending batch size 总和,如果pending size 超过 query mem limit 的1/3(666M), 则等待。每100ms检查一次pending size。直到pending size 低于阈值或 task 已经超时退出
   
   2. nodechannel 增加pending batch时检查条件去掉 对memtracker的依赖,因为 dev-1.0.1 中 memtracker有bug,会导致判断不准确。
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   4. Has unit tests been added: (Yes/No/No Need)
   5. Has document been added or modified: (Yes/No/No Need)
   6. Does it need to update dependencies: (Yes/No)
   7. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei commented on a diff in pull request #10644: [refactor] if pending bytes exceeded, vtableSink wait until pending bytes consumed or task was cancelled

Posted by GitBox <gi...@apache.org>.
yiguolei commented on code in PR #10644:
URL: https://github.com/apache/doris/pull/10644#discussion_r914536150


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -116,20 +115,11 @@ Status VOlapTableSink::send(RuntimeState* state, vectorized::Block* input_block)
     if (findTabletMode == FindTabletMode::FIND_TABLET_EVERY_BATCH) {
         _partition_to_tablet_map.clear();
     }
-    
-    //if pending bytes is more than table_sink_pending_bytes_limitation, wait at most 1 min
-    size_t MAX_PENDING_BYTES = config::table_sink_pending_bytes_limitation;
-    constexpr int max_retry = 120;
-    int retry = 0;
-    while (get_pending_bytes() > MAX_PENDING_BYTES && retry++ < max_retry) {
-        std::this_thread::sleep_for(std::chrono::microseconds(500));
-    }
-    if (get_pending_bytes() > MAX_PENDING_BYTES) {
-        std::stringstream str;
-        str << "Load task " << _load_id
-            << ": pending bytes exceed limit (config::table_sink_pending_bytes_limitation):"
-            << MAX_PENDING_BYTES;
-        return Status::MemoryLimitExceeded(str.str());
+
+    size_t MAX_PENDING_BYTES = _load_mem_limit / 3;
+    while (get_pending_bytes() > MAX_PENDING_BYTES) {

Review Comment:
   while (get_pending_bytes() > MAX_PENDING_BYTES && !state->is_cancelled())



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei merged pull request #10644: [refactor] if pending bytes exceeded, vtableSink wait until pending bytes consumed or task was cancelled

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #10644:
URL: https://github.com/apache/doris/pull/10644


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] englefly commented on a diff in pull request #10644: [refactor] if pending bytes exceeded, vtableSink wait until pending bytes consumed or task was cancelled

Posted by GitBox <gi...@apache.org>.
englefly commented on code in PR #10644:
URL: https://github.com/apache/doris/pull/10644#discussion_r914545899


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -116,20 +115,11 @@ Status VOlapTableSink::send(RuntimeState* state, vectorized::Block* input_block)
     if (findTabletMode == FindTabletMode::FIND_TABLET_EVERY_BATCH) {
         _partition_to_tablet_map.clear();
     }
-    
-    //if pending bytes is more than table_sink_pending_bytes_limitation, wait at most 1 min
-    size_t MAX_PENDING_BYTES = config::table_sink_pending_bytes_limitation;
-    constexpr int max_retry = 120;
-    int retry = 0;
-    while (get_pending_bytes() > MAX_PENDING_BYTES && retry++ < max_retry) {
-        std::this_thread::sleep_for(std::chrono::microseconds(500));
-    }
-    if (get_pending_bytes() > MAX_PENDING_BYTES) {
-        std::stringstream str;
-        str << "Load task " << _load_id
-            << ": pending bytes exceed limit (config::table_sink_pending_bytes_limitation):"
-            << MAX_PENDING_BYTES;
-        return Status::MemoryLimitExceeded(str.str());
+
+    size_t MAX_PENDING_BYTES = _load_mem_limit / 3;
+    while (get_pending_bytes() > MAX_PENDING_BYTES) {

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org