Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dcb91082
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看板
提交
dcb91082
编写于
5月 20, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): fix error.
上级
cb75e5a8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
23 deletion
+14
-23
source/dnode/snode/src/snode.c
source/dnode/snode/src/snode.c
+2
-4
source/libs/stream/src/stream.c
source/libs/stream/src/stream.c
+2
-2
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+8
-12
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+2
-5
未找到文件。
source/dnode/snode/src/snode.c
浏览文件 @
dcb91082
...
...
@@ -223,11 +223,9 @@ int32_t sndProcessTaskRetrieveReq(SSnode *pSnode, SRpcMsg *pMsg) {
tDecoderClear
(
&
decoder
);
int32_t
taskId
=
req
.
dstTaskId
;
SStreamTask
*
pTask
=
streamMetaAcquireTask
(
pSnode
->
pMeta
,
taskId
);
if
(
pTask
)
{
SRpcMsg
rsp
=
{
.
info
=
pMsg
->
info
,
.
code
=
0
,
};
SRpcMsg
rsp
=
{
.
info
=
pMsg
->
info
,
.
code
=
0
};
streamProcessRetrieveReq
(
pTask
,
&
req
,
&
rsp
);
streamMetaReleaseTask
(
pSnode
->
pMeta
,
pTask
);
tDeleteStreamRetrieveReq
(
&
req
);
...
...
source/libs/stream/src/stream.c
浏览文件 @
dcb91082
...
...
@@ -161,7 +161,7 @@ int32_t streamTaskEnqueueRetrieve(SStreamTask* pTask, SStreamRetrieveReq* pReq,
// enqueue
if
(
pData
!=
NULL
)
{
qDebug
(
"
task %d(child %d) recv retrieve req from task %d, reqId %"
PRId64
,
pTask
->
id
.
taskId
,
pTask
->
selfChildId
,
qDebug
(
"
s-task:%s (child %d) recv retrieve req from task:0x%x, reqId %"
PRId64
,
pTask
->
id
.
idStr
,
pTask
->
selfChildId
,
pReq
->
srcTaskId
,
pReq
->
reqId
);
pData
->
type
=
STREAM_INPUT__DATA_RETRIEVE
;
...
...
@@ -271,7 +271,7 @@ int32_t streamProcessRunReq(SStreamTask* pTask) {
}
int32_t
streamProcessRetrieveReq
(
SStreamTask
*
pTask
,
SStreamRetrieveReq
*
pReq
,
SRpcMsg
*
pRsp
)
{
qDebug
(
"s-task:%s receive retrieve req from node %d taskId:
%d
"
,
pTask
->
id
.
idStr
,
pReq
->
srcNodeId
,
pReq
->
srcTaskId
);
qDebug
(
"s-task:%s receive retrieve req from node %d taskId:
0x%x
"
,
pTask
->
id
.
idStr
,
pReq
->
srcNodeId
,
pReq
->
srcTaskId
);
streamTaskEnqueueRetrieve
(
pTask
,
pReq
,
pRsp
);
ASSERT
(
pTask
->
taskLevel
!=
TASK_LEVEL__SINK
);
...
...
source/libs/stream/src/streamDispatch.c
浏览文件 @
dcb91082
...
...
@@ -138,7 +138,6 @@ int32_t streamBroadcastToChildren(SStreamTask* pTask, const SSDataBlock* pBlock)
SStreamChildEpInfo
*
pEpInfo
=
taosArrayGetP
(
pTask
->
childEpInfo
,
i
);
req
.
dstNodeId
=
pEpInfo
->
nodeId
;
req
.
dstTaskId
=
pEpInfo
->
taskId
;
int32_t
code
;
int32_t
len
;
tEncodeSize
(
tEncodeStreamRetrieveReq
,
&
req
,
len
,
code
);
if
(
code
<
0
)
{
...
...
@@ -158,23 +157,18 @@ int32_t streamBroadcastToChildren(SStreamTask* pTask, const SSDataBlock* pBlock)
tEncodeStreamRetrieveReq
(
&
encoder
,
&
req
);
tEncoderClear
(
&
encoder
);
SRpcMsg
rpcMsg
=
{
.
code
=
0
,
.
msgType
=
TDMT_STREAM_RETRIEVE
,
.
pCont
=
buf
,
.
contLen
=
sizeof
(
SMsgHead
)
+
len
,
};
SRpcMsg
rpcMsg
=
{
.
code
=
0
,
.
msgType
=
TDMT_STREAM_RETRIEVE
,
.
pCont
=
buf
,
.
contLen
=
sizeof
(
SMsgHead
)
+
len
};
if
(
tmsgSendReq
(
&
pEpInfo
->
epSet
,
&
rpcMsg
)
<
0
)
{
ASSERT
(
0
);
goto
CLEAR
;
}
buf
=
NULL
;
qDebug
(
"s-task:%s (child %d) send retrieve req to task %d at node %d, reqId %"
PRId64
,
pTask
->
id
.
idStr
,
buf
=
NULL
;
qDebug
(
"s-task:%s (child %d) send retrieve req to task %d at node %d, reqId:0x%"
PRIx64
,
pTask
->
id
.
idStr
,
pTask
->
selfChildId
,
pEpInfo
->
taskId
,
pEpInfo
->
nodeId
,
req
.
reqId
);
}
code
=
0
;
CLEAR:
taosMemoryFree
(
pRetrieve
);
rpcFreeCont
(
buf
);
...
...
@@ -400,12 +394,14 @@ int32_t streamDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pDat
if
(
req
.
data
==
NULL
||
req
.
dataLen
==
NULL
)
{
taosArrayDestroyP
(
req
.
data
,
taosMemoryFree
);
taosArrayDestroy
(
req
.
dataLen
);
return
code
;
return
TSDB_CODE_OUT_OF_MEMORY
;
}
for
(
int32_t
i
=
0
;
i
<
numOfBlocks
;
i
++
)
{
SSDataBlock
*
pDataBlock
=
taosArrayGet
(
pData
->
blocks
,
i
);
if
(
streamAddBlockIntoDispatchMsg
(
pDataBlock
,
&
req
)
<
0
)
{
code
=
streamAddBlockIntoDispatchMsg
(
pDataBlock
,
&
req
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
taosArrayDestroyP
(
req
.
data
,
taosMemoryFree
);
taosArrayDestroy
(
req
.
dataLen
);
return
code
;
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
dcb91082
...
...
@@ -108,7 +108,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, i
block
.
info
.
type
=
STREAM_PULL_OVER
;
block
.
info
.
childId
=
pTask
->
selfChildId
;
taosArrayPush
(
pRes
,
&
block
);
numOfBlocks
+=
1
;
qDebug
(
"s-task:%s(child %d) processed retrieve, reqId:0x%"
PRIx64
,
pTask
->
id
.
idStr
,
pTask
->
selfChildId
,
pRetrieveBlock
->
reqId
);
}
...
...
@@ -152,14 +152,11 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, i
if
(
numOfBlocks
>
0
)
{
ASSERT
(
numOfBlocks
==
taosArrayGetSize
(
pRes
));
code
=
doDumpResult
(
pTask
,
pItem
,
pRes
,
size
,
totalSize
,
totalBlocks
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
}
else
{
taosArrayDestroy
(
pRes
);
}
return
0
;
return
code
;
}
int32_t
streamScanExec
(
SStreamTask
*
pTask
,
int32_t
batchSz
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录