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/06/30 01:58:47 UTC

[GitHub] [doris] yinzhijian commented on a diff in pull request #10501: [cherry-pick] 5 concurrent "insert...select..." OOM

yinzhijian commented on code in PR #10501:
URL: https://github.com/apache/doris/pull/10501#discussion_r910540000


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -426,6 +434,15 @@ 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 500M, wait
+    constexpr size_t MAX_PENDING_BYTES = 500 * 1024 * 1024;
+    if (get_pending_bytes() > MAX_PENDING_BYTES) {
+        while (get_pending_bytes() < MAX_PENDING_BYTES) {

Review Comment:
   The if statement seems unnecessary, and the while statement's condition seems misjudged



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