kaka11chen commented on code in PR #44635: URL: https://github.com/apache/doris/pull/44635#discussion_r1918912277
########## be/src/pipeline/exec/file_scan_operator.cpp: ########## @@ -37,9 +38,11 @@ Status FileScanLocalState::_init_scanners(std::list<vectorized::VScannerSPtr>* s } auto& p = _parent->cast<FileScanOperatorX>(); - uint32_t shard_num = std::min( - config::doris_scanner_thread_pool_thread_num / state()->query_parallel_instance_num(), - _max_scanners); + // There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. + uint32_t shard_num = + std::min(config::doris_scanner_thread_pool_thread_num / + (_batch_split_mode ? 1 : state()->query_parallel_instance_num()), Review Comment: If extract this function to scan operator, It seems that the runtime state cannot be obtained through `state()` except through the parameters of this function. But this feels a bit strange. ########## be/src/pipeline/exec/scan_operator.cpp: ########## @@ -979,18 +979,19 @@ Status ScanLocalState<Derived>::_prepare_scanners() { scanner->set_query_statistics(_query_statistics.get()); } COUNTER_SET(_num_scanners, static_cast<int64_t>(scanners.size())); - RETURN_IF_ERROR(_start_scanners(_scanners)); + RETURN_IF_ERROR(start_scanners(_scanners)); } return Status::OK(); } template <typename Derived> -Status ScanLocalState<Derived>::_start_scanners( +Status ScanLocalState<Derived>::start_scanners( Review Comment: If extract this function to scan operator, It seems that the runtime state cannot be obtained through state() except through the parameters of this function. But this feels a bit strange. -- 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