Skip to content

Commit 983d13a

Browse files
HappenLeeCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 4c21b59 commit 983d13a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

doris/benchmark.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,13 @@ mv *.parquet "$BE_DATA_DIR/user_files_secure"
9696

9797
BE_ID=$(mysql -h127.0.0.1 -P9030 -uroot -N -e 'show backends' | awk '{print $1}' | head -1)
9898

99-
PARALLEL_NUM=$(($(nproc) / 4))
100-
echo "Setting parallel_pipeline_task_num to $PARALLEL_NUM (cpu cores: $(nproc) / 4)"
99+
CORES=$(nproc)
100+
PARALLEL_NUM=$((CORES / 4))
101+
if [ "$PARALLEL_NUM" -lt 1 ]; then
102+
echo "Computed parallel_pipeline_task_num ($PARALLEL_NUM) is less than 1 based on $CORES cores; clamping to 1."
103+
PARALLEL_NUM=1
104+
fi
105+
echo "Setting parallel_pipeline_task_num to $PARALLEL_NUM (cpu cores: $CORES, computed as CORES/4 with min 1)"
101106

102107
echo "start loading hits.parquet using TVF, estimated to take about 3 minutes ..."
103108
START=$(date +%s)

0 commit comments

Comments
 (0)