yiguolei commented on code in PR #35351: URL: https://github.com/apache/doris/pull/35351#discussion_r1613040629
########## be/src/vec/exec/scan/scanner_context.cpp: ########## @@ -80,6 +80,28 @@ ScannerContext::ScannerContext(RuntimeState* state, const TupleDescriptor* outpu : state->query_parallel_instance_num()); _max_thread_num = _max_thread_num == 0 ? 1 : _max_thread_num; _max_thread_num = std::min(_max_thread_num, (int32_t)scanners.size()); + + // when user not specify scan_thread_num, so we can try downgrade _max_thread_num. + // becaue we found in a table with 5k columns, column reader may ocuppy too much memory. + // you can refer https://github.com/apache/doris/issues/35340 for details. + int32_t max_column_reader_num = state->query_options().max_column_reader_num; + if (_state->num_scanner_threads() <= 0 && _max_thread_num != 1 && max_column_reader_num > 0) { Review Comment: do not if here. Our policy is calculate different number s from user provided and use the minimum one. -- 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