[Bug](pipeline) fix bug for file scan node on pipeline engine (#20763)
This commit is contained in:
@ -1495,6 +1495,9 @@ public class Config extends ConfigBase {
|
||||
@ConfField(mutable = true)
|
||||
public static boolean enable_query_queue = true;
|
||||
|
||||
@ConfField(mutable = true)
|
||||
public static boolean disable_shared_scan = false;
|
||||
|
||||
@ConfField(mutable = false, masterOnly = true)
|
||||
public static int backend_rpc_timeout_ms = 60000; // 1 min
|
||||
|
||||
|
||||
@ -62,6 +62,7 @@ import org.apache.doris.planner.ScanNode;
|
||||
import org.apache.doris.planner.SetOperationNode;
|
||||
import org.apache.doris.planner.UnionNode;
|
||||
import org.apache.doris.planner.external.ExternalScanNode;
|
||||
import org.apache.doris.planner.external.FileScanNode;
|
||||
import org.apache.doris.proto.InternalService;
|
||||
import org.apache.doris.proto.InternalService.PExecPlanFragmentResult;
|
||||
import org.apache.doris.proto.InternalService.PExecPlanFragmentStartRequest;
|
||||
@ -1660,8 +1661,16 @@ public class Coordinator {
|
||||
return scanNode.getId().asInt() == planNodeId;
|
||||
}).findFirst();
|
||||
|
||||
// disable shared scan optimization if one of conditions below is met:
|
||||
// 1. Use non-pipeline engine
|
||||
// 2. Number of scan ranges is larger than instances
|
||||
// 3. This fragment has a colocated scan node
|
||||
// 4. This fragment has a FileScanNode
|
||||
// 5. Disable shared scan optimization by session variable
|
||||
if (!enablePipelineEngine || perNodeScanRanges.size() > parallelExecInstanceNum
|
||||
|| (node.isPresent() && node.get().getShouldColoScan())) {
|
||||
|| (node.isPresent() && node.get().getShouldColoScan())
|
||||
|| (node.isPresent() && node.get() instanceof FileScanNode)
|
||||
|| Config.disable_shared_scan) {
|
||||
int expectedInstanceNum = 1;
|
||||
if (parallelExecInstanceNum > 1) {
|
||||
//the scan instance num should not larger than the tablets num
|
||||
|
||||
Reference in New Issue
Block a user