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/01 13:43:46 UTC

[GitHub] [doris] englefly opened a new pull request, #10552: [hot-fix] fix a typo error and limit the max wait time in VOlapTableSink::send

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

   # Proposed changes
   1. fix a typo-error
   2. when total _pending_bytes of Table_Sink is over 500M, the wait time is at most 1 min.
   
   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)
   2. Has unit tests been added: (Yes/No/No Need)
   4. Has document been added or modified: (Yes/No/No Need)
   5. Does it need to update dependencies: (Yes/No)
   6. 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] englefly commented on a diff in pull request #10552: [hot-fix] fix a typo error and limit the max wait time in VOlapTableSink::send

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


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -117,12 +117,17 @@ Status VOlapTableSink::send(RuntimeState* state, vectorized::Block* input_block)
         _partition_to_tablet_map.clear();
     }
     
-    //if pending bytes is more than 500M, wait
+    //if pending bytes is more than 500M, wait at most 1 min
     constexpr size_t MAX_PENDING_BYTES = 500 * 1024 * 1024;
-    if ( get_pending_bytes() > MAX_PENDING_BYTES){
-        while(get_pending_bytes() < MAX_PENDING_BYTES){
-            std::this_thread::sleep_for(std::chrono::microseconds(500));
-        }
+    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 << ": Memory exceed limit. ";

Review Comment:
   more specific error message added
   ```
   str << "Load task " << _load_id
        << ": pending bytes exceed limit (config::table_sink_pending_bytes_limitation):"
        << MAX_PENDING_BYTES;
   ```
   the limitation is not hard coded, it is a config now 



-- 
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 #10552: [hot-fix] fix a typo error and limit the max wait time in VOlapTableSink::send

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


-- 
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 #10552: [hot-fix] fix a typo error and limit the max wait time in VOlapTableSink::send

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


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -117,12 +117,17 @@ Status VOlapTableSink::send(RuntimeState* state, vectorized::Block* input_block)
         _partition_to_tablet_map.clear();
     }
     
-    //if pending bytes is more than 500M, wait
+    //if pending bytes is more than 500M, wait at most 1 min
     constexpr size_t MAX_PENDING_BYTES = 500 * 1024 * 1024;
-    if ( get_pending_bytes() > MAX_PENDING_BYTES){
-        while(get_pending_bytes() < MAX_PENDING_BYTES){
-            std::this_thread::sleep_for(std::chrono::microseconds(500));
-        }
+    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 << ": Memory exceed limit. ";

Review Comment:
   more specific error message added
   ```
   str << "Load task " << _load_id
               << ": pending bytes exceed limit (config::table_sink_pending_bytes_limitation):"
               << MAX_PENDING_BYTES;
   ```
   the limitation is not hard coded, it is a config now 



-- 
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] dataroaring commented on a diff in pull request #10552: [hot-fix] fix a typo error and limit the max wait time in VOlapTableSink::send

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


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -117,12 +117,17 @@ Status VOlapTableSink::send(RuntimeState* state, vectorized::Block* input_block)
         _partition_to_tablet_map.clear();
     }
     
-    //if pending bytes is more than 500M, wait
+    //if pending bytes is more than 500M, wait at most 1 min
     constexpr size_t MAX_PENDING_BYTES = 500 * 1024 * 1024;
-    if ( get_pending_bytes() > MAX_PENDING_BYTES){
-        while(get_pending_bytes() < MAX_PENDING_BYTES){
-            std::this_thread::sleep_for(std::chrono::microseconds(500));
-        }
+    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 << ": Memory exceed limit. ";

Review Comment:
   Users may be confused by the error message. To me, it seems that I should use a bigger exec_mem_limit, however, the actual failure is not due to memory exceeds.  Should we really fail the load task here ? If so, may be a message "task stuck" should be reported?



-- 
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