Merge branch 'main' into merge/mainto3.0

This commit is contained in:
Simon Guan 2025-03-18 14:35:54 +08:00
commit 718d455a97
7 changed files with 79 additions and 33 deletions

View File

@ -188,7 +188,7 @@ cmake .. && cmake --build .
如果你想要编译 taosAdapter需要添加 `-DBUILD_HTTP=false` 选项。
如果你想要编译 taosKeeper需要添加 `--DBUILD_KEEPER=true` 选项。
如果你想要编译 taosKeeper需要添加 `-DBUILD_KEEPER=true` 选项。
</details>

View File

@ -174,7 +174,7 @@ make
If you want to compile taosAdapter, you need to add the `-DBUILD_HTTP=false` option.
If you want to compile taosKeeper, you need to add the `--DBUILD_KEEPER=true` option.
If you want to compile taosKeeper, you need to add the `-DBUILD_KEEPER=true` option.
You can use Jemalloc as memory allocator instead of glibc:
@ -206,7 +206,7 @@ cmake .. && cmake --build .
If you want to compile taosAdapter, you need to add the `-DBUILD_HTTP=false` option.
If you want to compile taosKeeper, you need to add the `--DBUILD_KEEPER=true` option.
If you want to compile taosKeeper, you need to add the `-DBUILD_KEEPER=true` option.
</details>

View File

@ -686,7 +686,7 @@ charset 的有效值是 UTF-8。
#### numOfMnodeReadThreads
- 说明mnode 的 Read 线程数目
- 类型:整数
- 默认值CPU 核数的四分之一(不超过 4
- 默认值CPU 核数的四分之一(不低于 1 不超过 4
- 最小值0
- 最大值1024
- 动态修改:支持通过 SQL 修改,重启生效。
@ -695,7 +695,7 @@ charset 的有效值是 UTF-8。
#### numOfVnodeQueryThreads
- 说明vnode 的 Query 线程数目
- 类型:整数
- 默认值CPU 核数的两倍(不超过 16
- 默认值CPU 核数的两倍(不低于 16
- 最小值0
- 最大值1024
- 动态修改:支持通过 SQL 修改,重启生效。
@ -704,7 +704,7 @@ charset 的有效值是 UTF-8。
#### numOfVnodeFetchThreads
- 说明vnode 的 Fetch 线程数目
- 类型:整数
- 默认值CPU 核数的四分之一(不超过 4
- 默认值CPU 核数的四分之一(不低于 4
- 最小值0
- 最大值1024
- 动态修改:支持通过 SQL 修改,重启生效。
@ -713,7 +713,7 @@ charset 的有效值是 UTF-8。
#### numOfVnodeRsmaThreads
- 说明vnode 的 Rsma 线程数目
- 类型:整数
- 默认值CPU 核数的四分之一(不超过 4
- 默认值CPU 核数的四分之一(不低于 4
- 最小值0
- 最大值1024
- 动态修改:支持通过 SQL 修改,重启生效。
@ -722,7 +722,7 @@ charset 的有效值是 UTF-8。
#### numOfQnodeQueryThreads
- 说明qnode 的 Query 线程数目
- 类型:整数
- 默认值CPU 核数的两倍(不超过 16
- 默认值CPU 核数的两倍(不低于 16
- 最小值0
- 最大值1024
- 动态修改:支持通过 SQL 修改,重启生效。
@ -1007,15 +1007,15 @@ charset 的有效值是 UTF-8。
#### udfdResFuncs
- 说明:用于统计用量 **`内部参数`**
- 类型:整数
- 类型:字符串
- 动态修改:支持通过 SQL 修改,重启生效。
- 支持版本:从 v3.1.0.0 版本开始引入
#### udfdLdLibPath
- 说明:用于统计用量 **`内部参数`**
- 类型:整数
- 动态修改:支持通过 SQL 修改,重启生效
- 支持版本v3.1.0.0 引入
- 类型:字符串
- 动态修改:支持通过 SQL 修改,重启生效
- 支持版本:v3.1.0.0 版本开始引入
#### enableStrongPassword
- 说明:密码要符合一个要求:至少包含大写字母、小写字母、数字、特殊字符中的三类。特殊字符包括 `! @ # $ % ^ & * ( ) - _ + = [ ] { } : ; > < ? | ~ , .`

View File

@ -1631,20 +1631,20 @@ int stmtClose(TAOS_STMT* stmt) {
STMT_DLOG_E("start to free stmt");
pStmt->queue.stopQueue = true;
(void)taosThreadMutexLock(&pStmt->queue.mutex);
(void)atomic_add_fetch_64(&pStmt->queue.qRemainNum, 1);
(void)taosThreadCondSignal(&(pStmt->queue.waitCond));
(void)taosThreadMutexUnlock(&pStmt->queue.mutex);
if (pStmt->bindThreadInUse) {
pStmt->queue.stopQueue = true;
(void)taosThreadMutexLock(&pStmt->queue.mutex);
(void)atomic_add_fetch_64(&pStmt->queue.qRemainNum, 1);
(void)taosThreadCondSignal(&(pStmt->queue.waitCond));
(void)taosThreadMutexUnlock(&pStmt->queue.mutex);
(void)taosThreadJoin(pStmt->bindThread, NULL);
pStmt->bindThreadInUse = false;
}
(void)taosThreadCondDestroy(&pStmt->queue.waitCond);
(void)taosThreadMutexDestroy(&pStmt->queue.mutex);
(void)taosThreadCondDestroy(&pStmt->queue.waitCond);
(void)taosThreadMutexDestroy(&pStmt->queue.mutex);
}
STMT_DLOG("stmt %p closed, stbInterlaceMode:%d, statInfo: ctgGetTbMetaNum=>%" PRId64 ", getCacheTbInfo=>%" PRId64
", parseSqlNum=>%" PRId64 ", pStmt->stat.bindDataNum=>%" PRId64

View File

@ -1928,16 +1928,19 @@ int stmtClose2(TAOS_STMT2* stmt) {
STMT_DLOG_E("start to free stmt");
pStmt->queue.stopQueue = true;
(void)taosThreadMutexLock(&pStmt->queue.mutex);
(void)atomic_add_fetch_64(&pStmt->queue.qRemainNum, 1);
(void)taosThreadCondSignal(&(pStmt->queue.waitCond));
(void)taosThreadMutexUnlock(&pStmt->queue.mutex);
if (pStmt->bindThreadInUse) {
pStmt->queue.stopQueue = true;
(void)taosThreadMutexLock(&pStmt->queue.mutex);
(void)atomic_add_fetch_64(&pStmt->queue.qRemainNum, 1);
(void)taosThreadCondSignal(&(pStmt->queue.waitCond));
(void)taosThreadMutexUnlock(&pStmt->queue.mutex);
(void)taosThreadJoin(pStmt->bindThread, NULL);
pStmt->bindThreadInUse = false;
(void)taosThreadCondDestroy(&pStmt->queue.waitCond);
(void)taosThreadMutexDestroy(&pStmt->queue.mutex);
}
TSC_ERR_RET(taosThreadMutexLock(&pStmt->asyncBindParam.mutex));
@ -1946,9 +1949,6 @@ int stmtClose2(TAOS_STMT2* stmt) {
}
TSC_ERR_RET(taosThreadMutexUnlock(&pStmt->asyncBindParam.mutex));
(void)taosThreadCondDestroy(&pStmt->queue.waitCond);
(void)taosThreadMutexDestroy(&pStmt->queue.mutex);
(void)taosThreadCondDestroy(&pStmt->asyncBindParam.waitCond);
(void)taosThreadMutexDestroy(&pStmt->asyncBindParam.mutex);

View File

@ -6786,7 +6786,7 @@ int32_t createTableMergeScanOperatorInfo(STableScanPhysiNode* pTableScanNode, SR
pInfo->mergeLimit = -1;
bool hasLimit = pInfo->limitInfo.limit.limit != -1 || pInfo->limitInfo.limit.offset != -1;
if (hasLimit) {
pInfo->mergeLimit = pInfo->limitInfo.limit.limit + pInfo->limitInfo.limit.offset;
pInfo->mergeLimit = pInfo->limitInfo.limit.offset != -1 ? pInfo->limitInfo.limit.limit + pInfo->limitInfo.limit.offset : pInfo->limitInfo.limit.limit;
pInfo->mSkipTables = NULL;
}

View File

@ -43,10 +43,56 @@ class TDTestCase:
tdSql.query("select d0.ts from test.d0 left join test.d1 on d0.ts=d1.ts limit 1000000;")
tdSql.checkRows(num1)
def ts6136(self):
start = 1500000000000
tdSql.execute("drop database if exists test1;")
tdCases.taosBenchmarkExec(f"-d test1 -t 3 -n 1000000 -s {start} -y")
while True:
tdSql.query("select count(*) from test1.meters;")
tdSql.checkRowCol(0, 0)
if tdSql.queryResult[0][0] == 3000000:
tdLog.info(f"ts6136 data ready, sum: {tdSql.queryResult[0][0]}")
break
tdLog.info(f"waiting for data ready, sum: {tdSql.queryResult[0][0]}")
time.sleep(1)
tdSql.query(f"insert into test1.d0 values({start + 962000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d0 values({start + 961000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d0 values({start + 960000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d0 values({start + 602000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d1 values({start + 602000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d0 values({start + 302000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d0 values({start + 2000}, 1, 1, 1);")
tdSql.query(f"insert into test1.d0 values({start + 0}, 1, 1, 1);")
# Query with limit 20 and store the results
tdSql.query("select tbname, ts, current from test1.meters where current = 1 and voltage = 1 and phase = 1 order by ts desc limit 8;")
tdSql.checkRows(8)
tbname_list = [row[0] for row in tdSql.queryResult]
ts_list = [row[1] for row in tdSql.queryResult]
# Test with different limits
for limit in range(1, 10):
row = min(8, limit)
tdSql.query(f"select tbname, ts, current from test1.meters where current = 1 and voltage = 1 and phase = 1 order by ts desc limit {limit};")
tdSql.checkRows(row)
result = tdSql.queryResult[:row]
for i in range(min(10, len(result))):
tdSql.checkData(i, 0, tbname_list[i])
tdSql.checkData(i, 1, ts_list[i])
tdLog.info("All tests passed for ts6136")
def run(self):
self.prepare_data()
self.ts5803()
self.ts6136()
def stop(self):
tdSql.close()