Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Jan 3, 2025
1 parent 4b6490f commit 977d957
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected List<AssignedJob> insideMachineParallelization(
ScanSource scanSource = entry.getValue().scanSource;

// usually, its tablets num, or buckets num
int scanSourceMaxParallel = Math.max(scanSource.maxParallel(scanNodes), 1);
int scanSourceMaxParallel = scanSource.maxParallel(scanNodes);

// now we should compute how many instances to process the data,
// for example: two instances
Expand Down Expand Up @@ -180,7 +180,7 @@ protected int degreeOfParallelism(int maxParallel, boolean useLocalShuffleToAddP
}

// the scan instance num should not larger than the tablets num
return maxParallel;
return Math.min(maxParallel, Math.max(fragment.getParallelExecNum(), 1));
}

protected List<AssignedJob> fillUpSingleEmptyInstance(DistributedPlanWorkerManager workerManager) {
Expand Down

0 comments on commit 977d957

Please sign in to comment.