xinyiZzz commented on code in PR #10354:
URL: https://github.com/apache/doris/pull/10354#discussion_r904811579
##########
be/src/exec/tablet_sink.cpp:
##########
@@ -315,9 +315,19 @@ Status NodeChannel::add_row(BlockRow& block_row, int64_t
tablet_id) {
SCOPED_ATOMIC_TIMER(&_mem_exceeded_block_ns);
SleepFor(MonoDelta::FromMilliseconds(10));
}
-
+ constexpr size_t BATCH_SIZE_FOR_SEND = 2 * 1024 * 1024; //2M
auto row_no = _cur_batch->add_row();
- if (row_no == RowBatch::INVALID_ROW_INDEX) {
+ if (row_no == RowBatch::INVALID_ROW_INDEX || _cur_batch->total_byte_size()
> BATCH_SIZE_FOR_SEND) {
+ //if pending bytes is more than 1G, wait
+ constexpr size_t MAX_PENDING_BYTES = 1073741824; //1G
+ if (_pending_batches_bytes>1073741824){
Review Comment:
之后这里用 MemTracker 的值作为判断条件是不是更合适
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]