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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org