From 2815227d2518ef2ff14e4cc0893a3b660f349e32 Mon Sep 17 00:00:00 2001 From: Yaming Pei Date: Mon, 3 Mar 2025 15:35:45 +0800 Subject: [PATCH] fix: thread concurrency <= count of a subtable --- tools/taos-tools/src/benchCsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/taos-tools/src/benchCsv.c b/tools/taos-tools/src/benchCsv.c index c491e94606..850d3b9a98 100644 --- a/tools/taos-tools/src/benchCsv.c +++ b/tools/taos-tools/src/benchCsv.c @@ -483,12 +483,12 @@ static int csvInitWriteMeta(SDataBase* db, SSuperTable* stb, CsvWriteMeta* write break; } case CSV_NAMING_B_THREAD: { - write_meta->total_threads = g_arguments->nthreads; + write_meta->total_threads = MIN(g_arguments->nthreads, stb->childTblCount); csvGenThreadFormatter(write_meta); break; } case CSV_NAMING_B_THREAD_TIME_SLICE: { - write_meta->total_threads = g_arguments->nthreads; + write_meta->total_threads = MIN(g_arguments->nthreads, stb->childTblCount); csvGenThreadFormatter(write_meta); csvCalcTimestampStep(write_meta); break;