Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
255af841
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
255af841
编写于
4月 25, 2023
作者:
5
54liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
resume option
上级
10582fb5
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
7 deletion
+9
-7
include/common/tmsg.h
include/common/tmsg.h
+1
-0
source/dnode/mnode/impl/src/mndStream.c
source/dnode/mnode/impl/src/mndStream.c
+8
-7
未找到文件。
include/common/tmsg.h
浏览文件 @
255af841
...
@@ -2886,6 +2886,7 @@ int32_t tDeserializeSMPauseStreamReq(void* buf, int32_t bufLen, SMPauseStreamReq
...
@@ -2886,6 +2886,7 @@ int32_t tDeserializeSMPauseStreamReq(void* buf, int32_t bufLen, SMPauseStreamReq
typedef
struct
{
typedef
struct
{
SMsgHead
head
;
SMsgHead
head
;
int32_t
taskId
;
int32_t
taskId
;
int8_t
igUntreated
;
}
SVResumeStreamTaskReq
;
}
SVResumeStreamTaskReq
;
typedef
struct
{
typedef
struct
{
...
...
source/dnode/mnode/impl/src/mndStream.c
浏览文件 @
255af841
...
@@ -1402,7 +1402,7 @@ static int32_t mndProcessPauseStreamReq(SRpcMsg *pReq) {
...
@@ -1402,7 +1402,7 @@ static int32_t mndProcessPauseStreamReq(SRpcMsg *pReq) {
}
}
static
int32_t
mndResumeStreamTask
(
STrans
*
pTrans
,
SStreamTask
*
pTask
)
{
static
int32_t
mndResumeStreamTask
(
STrans
*
pTrans
,
SStreamTask
*
pTask
,
int8_t
igUntreated
)
{
SVResumeStreamTaskReq
*
pReq
=
taosMemoryCalloc
(
1
,
sizeof
(
SVResumeStreamTaskReq
));
SVResumeStreamTaskReq
*
pReq
=
taosMemoryCalloc
(
1
,
sizeof
(
SVResumeStreamTaskReq
));
if
(
pReq
==
NULL
)
{
if
(
pReq
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
@@ -1410,10 +1410,11 @@ static int32_t mndResumeStreamTask(STrans *pTrans, SStreamTask *pTask) {
...
@@ -1410,10 +1410,11 @@ static int32_t mndResumeStreamTask(STrans *pTrans, SStreamTask *pTask) {
}
}
pReq
->
head
.
vgId
=
htonl
(
pTask
->
nodeId
);
pReq
->
head
.
vgId
=
htonl
(
pTask
->
nodeId
);
pReq
->
taskId
=
pTask
->
id
.
taskId
;
pReq
->
taskId
=
pTask
->
id
.
taskId
;
pReq
->
igUntreated
=
igUntreated
;
STransAction
action
=
{
0
};
STransAction
action
=
{
0
};
memcpy
(
&
action
.
epSet
,
&
pTask
->
epSet
,
sizeof
(
SEpSet
));
memcpy
(
&
action
.
epSet
,
&
pTask
->
epSet
,
sizeof
(
SEpSet
));
action
.
pCont
=
pReq
;
action
.
pCont
=
pReq
;
action
.
contLen
=
sizeof
(
SV
Paus
eStreamTaskReq
);
action
.
contLen
=
sizeof
(
SV
Resum
eStreamTaskReq
);
action
.
msgType
=
TDMT_STREAM_TASK_RESUME
;
action
.
msgType
=
TDMT_STREAM_TASK_RESUME
;
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
taosMemoryFree
(
pReq
);
taosMemoryFree
(
pReq
);
...
@@ -1422,14 +1423,14 @@ static int32_t mndResumeStreamTask(STrans *pTrans, SStreamTask *pTask) {
...
@@ -1422,14 +1423,14 @@ static int32_t mndResumeStreamTask(STrans *pTrans, SStreamTask *pTask) {
return
0
;
return
0
;
}
}
int32_t
mndResumeAllStreamTasks
(
STrans
*
pTrans
,
SStreamObj
*
pStream
)
{
int32_t
mndResumeAllStreamTasks
(
STrans
*
pTrans
,
SStreamObj
*
pStream
,
int8_t
igUntreated
)
{
int32_t
size
=
taosArrayGetSize
(
pStream
->
tasks
);
int32_t
size
=
taosArrayGetSize
(
pStream
->
tasks
);
for
(
int32_t
i
=
0
;
i
<
size
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
size
;
i
++
)
{
SArray
*
pTasks
=
taosArrayGetP
(
pStream
->
tasks
,
i
);
SArray
*
pTasks
=
taosArrayGetP
(
pStream
->
tasks
,
i
);
int32_t
sz
=
taosArrayGetSize
(
pTasks
);
int32_t
sz
=
taosArrayGetSize
(
pTasks
);
for
(
int32_t
j
=
0
;
j
<
sz
;
j
++
)
{
for
(
int32_t
j
=
0
;
j
<
sz
;
j
++
)
{
SStreamTask
*
pTask
=
taosArrayGetP
(
pTasks
,
j
);
SStreamTask
*
pTask
=
taosArrayGetP
(
pTasks
,
j
);
if
(
mndResumeStreamTask
(
pTrans
,
pTask
)
<
0
)
{
if
(
mndResumeStreamTask
(
pTrans
,
pTask
,
igUntreated
)
<
0
)
{
return
-
1
;
return
-
1
;
}
}
}
}
...
@@ -1441,8 +1442,8 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
...
@@ -1441,8 +1442,8 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
SMnode
*
pMnode
=
pReq
->
info
.
node
;
SMnode
*
pMnode
=
pReq
->
info
.
node
;
SStreamObj
*
pStream
=
NULL
;
SStreamObj
*
pStream
=
NULL
;
SM
Paus
eStreamReq
pauseReq
=
{
0
};
SM
Resum
eStreamReq
pauseReq
=
{
0
};
if
(
tDeserializeSM
Paus
eStreamReq
(
pReq
->
pCont
,
pReq
->
contLen
,
&
pauseReq
)
<
0
)
{
if
(
tDeserializeSM
Resum
eStreamReq
(
pReq
->
pCont
,
pReq
->
contLen
,
&
pauseReq
)
<
0
)
{
terrno
=
TSDB_CODE_INVALID_MSG
;
terrno
=
TSDB_CODE_INVALID_MSG
;
return
-
1
;
return
-
1
;
}
}
...
@@ -1481,7 +1482,7 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
...
@@ -1481,7 +1482,7 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
}
}
// resume all tasks
// resume all tasks
if
(
mndResumeAllStreamTasks
(
pTrans
,
pStream
)
<
0
)
{
if
(
mndResumeAllStreamTasks
(
pTrans
,
pStream
,
pauseReq
.
igUntreated
)
<
0
)
{
mError
(
"stream:%s, failed to drop task since %s"
,
pauseReq
.
name
,
terrstr
());
mError
(
"stream:%s, failed to drop task since %s"
,
pauseReq
.
name
,
terrstr
());
sdbRelease
(
pMnode
->
pSdb
,
pStream
);
sdbRelease
(
pMnode
->
pSdb
,
pStream
);
mndTransDrop
(
pTrans
);
mndTransDrop
(
pTrans
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录