diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 099706701641bb571ebfdbdea9ef3122e5f92416..9f69a8a66de5c71886e550115aa5168d54b248dc 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1060,8 +1060,8 @@ static int32_t insertChildTablePointsBatch(TAOS* taos, char* cTableName, char* s tscDebug("SML:0x%"PRIx64" insert child table table %s of super table %s : %s", info->id, cTableName, sTableName, sql); - size_t rows = taosArrayGetSize(rowsBind); size_t maxBatchSize = TSDB_MAX_WAL_SIZE/rowSize * 2 / 3; + size_t rows = taosArrayGetSize(rowsBind); size_t batchSize = MIN(maxBatchSize, rows); tscDebug("SML:0x%"PRIx64" insert rows into child table %s. num of rows: %zu, batch size: %zu", info->id, cTableName, rows, batchSize);