Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7d91f356
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
7d91f356
编写于
11月 24, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
11月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18395 from taosdata/fix/liao_cov
refactor: enable continue query when the buffer of sink node is empty
上级
eb4efcb5
b460974f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
18 deletion
+23
-18
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+6
-8
source/libs/executor/src/dataDispatcher.c
source/libs/executor/src/dataDispatcher.c
+3
-1
source/libs/executor/src/exchangeoperator.c
source/libs/executor/src/exchangeoperator.c
+14
-9
未找到文件。
source/client/test/clientTests.cpp
浏览文件 @
7d91f356
...
...
@@ -692,7 +692,6 @@ TEST(testCase, insert_test) {
taos_free_result(pRes);
taos_close(pConn);
}
#endif
TEST(testCase, projection_query_tables) {
TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
...
...
@@ -752,9 +751,6 @@ TEST(testCase, projection_query_tables) {
taos_close(pConn);
}
#if 0
TEST(testCase, tsbs_perf_test) {
TdThread qid[20] = {0};
...
...
@@ -764,15 +760,16 @@ TEST(testCase, tsbs_perf_test) {
getchar();
}
#endif
TEST
(
testCase
,
projection_query_stables
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
ASSERT_NE
(
pConn
,
nullptr
);
TAOS_RES* pRes = taos_query(pConn, "use
abc1
");
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use
test
"
);
taos_free_result
(
pRes
);
pRes = taos_query(pConn, "select
ts from st1
");
pRes
=
taos_query
(
pConn
,
"select
* from meters limit 50000000
"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to select from table, reason:%s
\n
"
,
taos_errstr
(
pRes
));
taos_free_result
(
pRes
);
...
...
@@ -785,14 +782,15 @@ TEST(testCase, projection_query_stables) {
char
str
[
512
]
=
{
0
};
while
((
pRow
=
taos_fetch_row
(
pRes
))
!=
NULL
)
{
int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
printf("%s\n", str);
//
int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
//
printf("%s\n", str);
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
#if 0
TEST(testCase, agg_query_tables) {
TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
ASSERT_NE(pConn, nullptr);
...
...
source/libs/executor/src/dataDispatcher.c
浏览文件 @
7d91f356
...
...
@@ -138,7 +138,9 @@ static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput,
toDataCacheEntry
(
pDispatcher
,
pInput
,
pBuf
);
taosWriteQitem
(
pDispatcher
->
pDataBlocks
,
pBuf
);
*
pContinue
=
(
DS_BUF_LOW
==
updateStatus
(
pDispatcher
)
?
true
:
false
);
int32_t
status
=
updateStatus
(
pDispatcher
);
*
pContinue
=
(
status
==
DS_BUF_LOW
||
status
==
DS_BUF_EMPTY
);
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/executor/src/exchangeoperator.c
浏览文件 @
7d91f356
...
...
@@ -75,7 +75,9 @@ static void concurrentlyLoadRemoteDataImpl(SOperatorInfo* pOperator, SExchangeIn
}
while
(
1
)
{
qDebug
(
"prepare wait for ready, %p, %s"
,
pExchangeInfo
,
GET_TASKID
(
pTaskInfo
));
tsem_wait
(
&
pExchangeInfo
->
ready
);
if
(
isTaskKilled
(
pTaskInfo
))
{
longjmp
(
pTaskInfo
->
env
,
TSDB_CODE_TSC_QUERY_CANCELLED
);
}
...
...
@@ -360,7 +362,7 @@ int32_t loadRemoteDataCallback(void* param, SDataBuf* pMsg, int32_t code) {
SExchangeInfo
*
pExchangeInfo
=
taosAcquireRef
(
exchangeObjRefPool
,
pWrapper
->
exchangeId
);
if
(
pExchangeInfo
==
NULL
)
{
qWarn
(
"failed to acquire exchange operator, since it may have been released
"
);
qWarn
(
"failed to acquire exchange operator, since it may have been released
, %p"
,
pExchangeInfo
);
taosMemoryFree
(
pMsg
->
pData
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -379,20 +381,23 @@ int32_t loadRemoteDataCallback(void* param, SDataBuf* pMsg, int32_t code) {
pRsp
->
numOfBlocks
=
htonl
(
pRsp
->
numOfBlocks
);
ASSERT
(
pRsp
!=
NULL
);
qDebug
(
"%s fetch rsp received, index:%d, blocks:%d, rows:%d"
,
pSourceDataInfo
->
taskId
,
index
,
pRsp
->
numOfBlocks
,
pRsp
->
numOfRows
);
qDebug
(
"%s fetch rsp received, index:%d, blocks:%d, rows:%d
, %p
"
,
pSourceDataInfo
->
taskId
,
index
,
pRsp
->
numOfBlocks
,
pRsp
->
numOfRows
,
pExchangeInfo
);
}
else
{
taosMemoryFree
(
pMsg
->
pData
);
pSourceDataInfo
->
code
=
code
;
qDebug
(
"%s fetch rsp received, index:%d, error:%s
"
,
pSourceDataInfo
->
taskId
,
index
,
tstrerror
(
code
)
);
qDebug
(
"%s fetch rsp received, index:%d, error:%s
, %p"
,
pSourceDataInfo
->
taskId
,
index
,
tstrerror
(
code
),
pExchangeInfo
);
}
pSourceDataInfo
->
status
=
EX_SOURCE_DATA_READY
;
code
=
tsem_post
(
&
pExchangeInfo
->
ready
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
code
=
TAOS_SYSTEM_ERROR
(
code
);
qError
(
"failed to invoke post when fetch rsp is ready, code:%s, %p"
,
tstrerror
(
code
),
pExchangeInfo
);
}
tsem_post
(
&
pExchangeInfo
->
ready
);
taosReleaseRef
(
exchangeObjRefPool
,
pWrapper
->
exchangeId
);
return
TSDB_CODE_SUCCESS
;
return
code
;
}
int32_t
doSendFetchDataRequest
(
SExchangeInfo
*
pExchangeInfo
,
SExecTaskInfo
*
pTaskInfo
,
int32_t
sourceIndex
)
{
...
...
@@ -444,9 +449,9 @@ int32_t doSendFetchDataRequest(SExchangeInfo* pExchangeInfo, SExecTaskInfo* pTas
return
pTaskInfo
->
code
;
}
qDebug
(
"%s build fetch msg and send to vgId:%d, ep:%s, taskId:0x%"
PRIx64
", execId:%d, %d/%"
PRIzu
,
qDebug
(
"%s build fetch msg and send to vgId:%d, ep:%s, taskId:0x%"
PRIx64
", execId:%d, %
p, %
d/%"
PRIzu
,
GET_TASKID
(
pTaskInfo
),
pSource
->
addr
.
nodeId
,
pSource
->
addr
.
epSet
.
eps
[
0
].
fqdn
,
pSource
->
taskId
,
pSource
->
execId
,
sourceIndex
,
totalSources
);
pSource
->
execId
,
pExchangeInfo
,
sourceIndex
,
totalSources
);
// send the fetch remote task result reques
SMsgSendInfo
*
pMsgSendInfo
=
taosMemoryCalloc
(
1
,
sizeof
(
SMsgSendInfo
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录