Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f9a64cbc
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看板
提交
f9a64cbc
编写于
4月 28, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
other: add some logs.
上级
da0d9c78
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
15 deletion
+25
-15
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+11
-9
source/dnode/vnode/src/tq/tqRestore.c
source/dnode/vnode/src/tq/tqRestore.c
+1
-1
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+8
-4
source/libs/stream/src/streamRecover.c
source/libs/stream/src/streamRecover.c
+5
-1
未找到文件。
source/dnode/vnode/src/tq/tq.c
浏览文件 @
f9a64cbc
...
...
@@ -821,13 +821,18 @@ int32_t tqProcessTaskRecover1Req(STQ* pTq, SRpcMsg* pMsg) {
}
// do recovery step 1
streamSourceRecoverScanStep1
(
pTask
);
tqDebug
(
"s-task:%s start recover step 1 scan"
,
pTask
->
id
.
idStr
);
int64_t
st
=
taosGetTimestampMs
();
streamSourceRecoverScanStep1
(
pTask
);
if
(
atomic_load_8
(
&
pTask
->
status
.
taskStatus
)
==
TASK_STATUS__DROPPING
)
{
streamMetaReleaseTask
(
pTq
->
pStreamMeta
,
pTask
);
return
0
;
}
double
el
=
(
taosGetTimestampMs
()
-
st
)
/
1000
.
0
;
tqDebug
(
"s-task:%s recover step 1 ended, elapsed time:%.2fs"
,
pTask
->
id
.
idStr
,
el
);
// build msg to launch next step
SStreamRecoverStep2Req
req
;
code
=
streamBuildSourceRecover2Req
(
pTask
,
&
req
);
...
...
@@ -853,20 +858,17 @@ int32_t tqProcessTaskRecover1Req(STQ* pTq, SRpcMsg* pMsg) {
memcpy
(
serializedReq
,
&
req
,
len
);
// dispatch msg
SRpcMsg
rpcMsg
=
{
.
code
=
0
,
.
contLen
=
len
,
.
msgType
=
TDMT_VND_STREAM_RECOVER_BLOCKING_STAGE
,
.
pCont
=
serializedReq
,
};
tqDebug
(
"s-task:%s start recover block stage"
,
pTask
->
id
.
idStr
);
SRpcMsg
rpcMsg
=
{
.
code
=
0
,
.
contLen
=
len
,
.
msgType
=
TDMT_VND_STREAM_RECOVER_BLOCKING_STAGE
,
.
pCont
=
serializedReq
};
tmsgPutToQueue
(
&
pTq
->
pVnode
->
msgCb
,
WRITE_QUEUE
,
&
rpcMsg
);
return
0
;
}
int32_t
tqProcessTaskRecover2Req
(
STQ
*
pTq
,
int64_t
sversion
,
char
*
msg
,
int32_t
msgLen
)
{
int32_t
code
;
int32_t
code
=
0
;
SStreamRecoverStep2Req
*
pReq
=
(
SStreamRecoverStep2Req
*
)
msg
;
SStreamTask
*
pTask
=
streamMetaAcquireTask
(
pTq
->
pStreamMeta
,
pReq
->
taskId
);
if
(
pTask
==
NULL
)
{
...
...
source/dnode/vnode/src/tq/tqRestore.c
浏览文件 @
f9a64cbc
...
...
@@ -107,7 +107,7 @@ int32_t createStreamRunReq(SStreamMeta* pStreamMeta, bool* pScanIdle) {
if
(
streamTaskShouldStop
(
&
pTask
->
status
)
||
status
==
TASK_STATUS__RECOVER_PREPARE
||
status
==
TASK_STATUS__WAIT_DOWNSTREAM
)
{
tqDebug
(
"s-task:%s
skip push data, not ready for processing
, status:%d"
,
pTask
->
id
.
idStr
,
status
);
tqDebug
(
"s-task:%s
not ready for new submit block from wal
, status:%d"
,
pTask
->
id
.
idStr
,
status
);
streamMetaReleaseTask
(
pStreamMeta
,
pTask
);
continue
;
}
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
f9a64cbc
...
...
@@ -165,20 +165,24 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) {
batchCnt
++
;
qDebug
(
"
task %d scan exec block num %d, block limit %d"
,
pTask
->
id
.
taskId
,
batchCnt
,
batchSz
);
qDebug
(
"
s-task:%s scan exec block num %d, block limit %d"
,
pTask
->
id
.
idStr
,
batchCnt
,
batchSz
);
if
(
batchCnt
>=
batchSz
)
break
;
if
(
batchCnt
>=
batchSz
)
{
break
;
}
}
if
(
taosArrayGetSize
(
pRes
)
==
0
)
{
if
(
finished
)
{
taosArrayDestroy
(
pRes
);
qDebug
(
"
task %d finish recover exec task "
,
pTask
->
id
.
taskId
);
qDebug
(
"
s-task:%s finish recover exec task "
,
pTask
->
id
.
idStr
);
break
;
}
else
{
qDebug
(
"
task %d continue recover exec task "
,
pTask
->
id
.
taskId
);
qDebug
(
"
s-task:%s continue recover exec task "
,
pTask
->
id
.
idStr
);
continue
;
}
}
SStreamDataBlock
*
qRes
=
taosAllocateQitem
(
sizeof
(
SStreamDataBlock
),
DEF_QITEM
,
0
);
if
(
qRes
==
NULL
)
{
taosArrayDestroyEx
(
pRes
,
(
FDelete
)
blockDataFreeRes
);
...
...
source/libs/stream/src/streamRecover.c
浏览文件 @
f9a64cbc
...
...
@@ -20,6 +20,8 @@ int32_t streamTaskLaunchRecover(SStreamTask* pTask, int64_t version) {
if
(
pTask
->
taskLevel
==
TASK_LEVEL__SOURCE
)
{
atomic_store_8
(
&
pTask
->
status
.
taskStatus
,
TASK_STATUS__RECOVER_PREPARE
);
qDebug
(
"s-task:%s set task status:%d and start recover"
,
pTask
->
id
.
idStr
,
pTask
->
status
.
taskStatus
);
streamSetParamForRecover
(
pTask
);
streamSourceRecoverPrepareStep1
(
pTask
,
version
);
...
...
@@ -197,7 +199,6 @@ int32_t streamBuildSourceRecover1Req(SStreamTask* pTask, SStreamRecoverStep1Req*
}
int32_t
streamSourceRecoverScanStep1
(
SStreamTask
*
pTask
)
{
//
return
streamScanExec
(
pTask
,
100
);
}
...
...
@@ -210,8 +211,11 @@ int32_t streamBuildSourceRecover2Req(SStreamTask* pTask, SStreamRecoverStep2Req*
int32_t
streamSourceRecoverScanStep2
(
SStreamTask
*
pTask
,
int64_t
ver
)
{
void
*
exec
=
pTask
->
exec
.
pExecutor
;
qDebug
(
"s-task:%s recover step2(blocking stage) started"
,
pTask
->
id
.
idStr
);
if
(
qStreamSourceRecoverStep2
(
exec
,
ver
)
<
0
)
{
}
return
streamScanExec
(
pTask
,
100
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录