Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8b27f98e
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8b27f98e
编写于
8月 21, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor.
上级
387b4d36
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
18 deletion
+16
-18
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+12
-13
source/libs/stream/src/streamData.c
source/libs/stream/src/streamData.c
+1
-1
source/libs/stream/src/streamRecover.c
source/libs/stream/src/streamRecover.c
+2
-3
source/libs/stream/src/streamTask.c
source/libs/stream/src/streamTask.c
+1
-1
未找到文件。
source/dnode/vnode/src/tq/tq.c
浏览文件 @
8b27f98e
...
...
@@ -1777,7 +1777,7 @@ int32_t tqProcessStreamCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg) {
if
(
tDecodeStreamCheckpointSourceReq
(
&
decoder
,
&
req
)
<
0
)
{
code
=
TSDB_CODE_MSG_DECODE_ERROR
;
tDecoderClear
(
&
decoder
);
tqError
(
"vgId:%d failed to decode checkpoint
source msg, code:%s"
,
vgId
,
tstrerror
(
code
));
tqError
(
"vgId:%d failed to decode checkpoint
-
source msg, code:%s"
,
vgId
,
tstrerror
(
code
));
return
code
;
}
tDecoderClear
(
&
decoder
);
...
...
@@ -1790,18 +1790,10 @@ int32_t tqProcessStreamCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg) {
return
TSDB_CODE_SUCCESS
;
}
code
=
streamAddCheckpointSourceRspMsg
(
&
req
,
&
pMsg
->
info
,
pTask
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
// todo: when generating checkpoint, no new tasks are allowed to add into current Vnode
// todo: when generating checkpoint, leader of mnode has transfer to other DNode?
// set the initial value for generating check point
int32_t
total
=
0
;
taosWLockLatch
(
&
pMeta
->
lock
);
// set the initial value for generating check point
// set the mgmt epset info according to the checkout source msg from mnode, todo opt perf
pMeta
->
mgmtInfo
.
epset
=
req
.
mgmtEps
;
pMeta
->
mgmtInfo
.
mnodeId
=
req
.
mnodeId
;
...
...
@@ -1813,9 +1805,16 @@ int32_t tqProcessStreamCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg) {
total
=
taosArrayGetSize
(
pMeta
->
pTaskList
);
taosWUnLockLatch
(
&
pMeta
->
lock
);
qDebug
(
"s-task:%s level:%d receive checkpoint source msg from mnode id:%"
PRId64
", total source checkpoint req:%d"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
taskLevel
,
req
.
checkpointId
,
total
);
qDebug
(
"s-task:%s (vgId:%d) level:%d receive checkpoint-source msg, chkpt:%"
PRId64
", total checkpoint req:%d"
,
pTask
->
id
.
idStr
,
vgId
,
pTask
->
info
.
taskLevel
,
req
.
checkpointId
,
total
);
code
=
streamAddCheckpointSourceRspMsg
(
&
req
,
&
pMsg
->
info
,
pTask
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
// todo: when generating checkpoint, no new tasks are allowed to add into current Vnode
// todo: when generating checkpoint, leader of mnode has transfer to other DNode?
streamProcessCheckpointSourceReq
(
pTask
,
&
req
);
streamMetaReleaseTask
(
pMeta
,
pTask
);
return
code
;
...
...
@@ -1934,7 +1933,7 @@ _end:
taosWUnLockLatch
(
&
pMeta
->
lock
);
if
(
vnodeIsRoleLeader
(
pTq
->
pVnode
)
&&
!
tsDisableStream
)
{
vInfo
(
"vgId:%d, restart
to
all stream tasks"
,
vgId
);
vInfo
(
"vgId:%d, restart all stream tasks"
,
vgId
);
tqCheckStreamStatus
(
pTq
);
}
}
...
...
source/libs/stream/src/streamData.c
浏览文件 @
8b27f98e
...
...
@@ -250,7 +250,7 @@ const char* streamGetBlockTypeStr(int32_t type) {
case
STREAM_INPUT__CHECKPOINT
:
return
"checkpoint"
;
case
STREAM_INPUT__CHECKPOINT_TRIGGER
:
return
"checkpoint-trigg
re
"
;
return
"checkpoint-trigg
er
"
;
case
STREAM_INPUT__TRANS_STATE
:
return
"trans-state"
;
default:
...
...
source/libs/stream/src/streamRecover.c
浏览文件 @
8b27f98e
...
...
@@ -178,10 +178,9 @@ int32_t streamRecheckDownstream(SStreamTask* pTask, const SStreamTaskCheckRsp* p
.
stage
=
pTask
->
pMeta
->
stage
,
};
qDebug
(
"s-task:%s (vgId:%d) check downstream task:0x%x (vgId:%d) stage:%"
PRId64
" (recheck)"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
nodeId
,
req
.
downstreamTaskId
,
req
.
downstreamNodeId
,
req
.
stage
);
if
(
pTask
->
outputInfo
.
type
==
TASK_OUTPUT__FIXED_DISPATCH
)
{
qDebug
(
"s-task:%s (vgId:%d) check downstream task:0x%x (vgId:%d) stage:%"
PRId64
" (recheck)"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
nodeId
,
req
.
downstreamTaskId
,
req
.
downstreamNodeId
,
req
.
stage
);
streamDispatchCheckMsg
(
pTask
,
&
req
,
pRsp
->
downstreamNodeId
,
&
pTask
->
fixedEpDispatcher
.
epSet
);
}
else
if
(
pTask
->
outputInfo
.
type
==
TASK_OUTPUT__SHUFFLE_DISPATCH
)
{
SArray
*
vgInfo
=
pTask
->
shuffleDispatcher
.
dbInfo
.
pVgroupInfos
;
...
...
source/libs/stream/src/streamTask.c
浏览文件 @
8b27f98e
...
...
@@ -419,7 +419,7 @@ void streamTaskUpdateUpstreamInfo(SStreamTask* pTask, int32_t nodeId, const SEpS
int32_t
numOfUpstream
=
taosArrayGetSize
(
pTask
->
pUpstreamInfoList
);
for
(
int32_t
i
=
0
;
i
<
numOfUpstream
;
++
i
)
{
SStreamChildEpInfo
*
pInfo
=
taosArrayGet
(
pTask
->
pUpstreamInfoList
,
i
);
SStreamChildEpInfo
*
pInfo
=
taosArrayGet
P
(
pTask
->
pUpstreamInfoList
,
i
);
if
(
pInfo
->
nodeId
==
nodeId
)
{
epsetAssign
(
&
pInfo
->
epSet
,
pEpSet
);
qDebug
(
"s-task:0x%x update the upstreamInfo, nodeId:%d newEpset:%s"
,
pTask
->
id
.
taskId
,
nodeId
,
buf
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录