This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch dev-1.0.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.0.1 by this push: new 6d98f6a43e fix bug (#10509) 6d98f6a43e is described below commit 6d98f6a43e07b3e390b11686fc7bacdc092d741f Author: minghong <minghong.z...@163.com> AuthorDate: Thu Jun 30 14:10:10 2022 +0800 fix bug (#10509) --- be/src/vec/sink/vtablet_sink.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/be/src/vec/sink/vtablet_sink.cpp b/be/src/vec/sink/vtablet_sink.cpp index e78fc094aa..7b61a1e029 100644 --- a/be/src/vec/sink/vtablet_sink.cpp +++ b/be/src/vec/sink/vtablet_sink.cpp @@ -116,13 +116,13 @@ 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 + + //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)); } for (int i = 0; i < num_rows; ++i) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org