未验证 提交 1b998f06 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-3472] <fix>: fix query times determination miss. (#5576)

Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 a4b3e5a7
...@@ -5428,7 +5428,10 @@ static void *superQueryProcess(void *sarg) { ...@@ -5428,7 +5428,10 @@ static void *superQueryProcess(void *sarg) {
int64_t st = 0; int64_t st = 0;
int64_t et = 0; int64_t et = 0;
while (1) {
int queryTimes = g_args.query_times;
while(queryTimes --) {
if (g_queryInfo.superQueryInfo.rate && (et - st) < if (g_queryInfo.superQueryInfo.rate && (et - st) <
(int64_t)g_queryInfo.superQueryInfo.rate*1000) { (int64_t)g_queryInfo.superQueryInfo.rate*1000) {
taosMsleep(g_queryInfo.superQueryInfo.rate*1000 - (et - st)); // ms taosMsleep(g_queryInfo.superQueryInfo.rate*1000 - (et - st)); // ms
...@@ -5498,7 +5501,7 @@ static void *subQueryProcess(void *sarg) { ...@@ -5498,7 +5501,7 @@ static void *subQueryProcess(void *sarg) {
int64_t et = (int64_t)g_queryInfo.subQueryInfo.rate*1000; int64_t et = (int64_t)g_queryInfo.subQueryInfo.rate*1000;
int queryTimes = g_args.query_times; int queryTimes = g_args.query_times;
while (queryTimes --) { while(queryTimes --) {
if (g_queryInfo.subQueryInfo.rate if (g_queryInfo.subQueryInfo.rate
&& (et - st) < (int64_t)g_queryInfo.subQueryInfo.rate*1000) { && (et - st) < (int64_t)g_queryInfo.subQueryInfo.rate*1000) {
taosMsleep(g_queryInfo.subQueryInfo.rate*1000 - (et - st)); // ms taosMsleep(g_queryInfo.subQueryInfo.rate*1000 - (et - st)); // ms
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册