Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
777ed176
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看板
提交
777ed176
编写于
4月 29, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: update logs.
上级
39cac9d3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+7
-7
source/dnode/vnode/src/tq/tqRestore.c
source/dnode/vnode/src/tq/tqRestore.c
+2
-2
source/libs/stream/src/stream.c
source/libs/stream/src/stream.c
+2
-2
未找到文件。
source/dnode/vnode/src/tq/tq.c
浏览文件 @
777ed176
...
...
@@ -821,12 +821,11 @@ int32_t tqProcessTaskRecover1Req(STQ* pTq, SRpcMsg* pMsg) {
}
// do recovery step 1
tqDebug
(
"s-task:%s start
recover step 1
scan"
,
pTask
->
id
.
idStr
);
tqDebug
(
"s-task:%s start
non-blocking recover stage(step 1)
scan"
,
pTask
->
id
.
idStr
);
int64_t
st
=
taosGetTimestampMs
();
streamSourceRecoverScanStep1
(
pTask
);
if
(
atomic_load_8
(
&
pTask
->
status
.
taskStatus
)
==
TASK_STATUS__DROPPING
)
{
double
el
=
(
taosGetTimestampMs
()
-
st
)
/
1000
.
0
;
tqDebug
(
"s-task:%s is dropped, abort recover in step1"
,
pTask
->
id
.
idStr
);
streamMetaReleaseTask
(
pTq
->
pStreamMeta
,
pTask
);
...
...
@@ -834,7 +833,7 @@ int32_t tqProcessTaskRecover1Req(STQ* pTq, SRpcMsg* pMsg) {
}
double
el
=
(
taosGetTimestampMs
()
-
st
)
/
1000
.
0
;
tqDebug
(
"s-task:%s
recover step 1
ended, elapsed time:%.2fs"
,
pTask
->
id
.
idStr
,
el
);
tqDebug
(
"s-task:%s
non-blocking recover stage(step 1)
ended, elapsed time:%.2fs"
,
pTask
->
id
.
idStr
,
el
);
// build msg to launch next step
SStreamRecoverStep2Req
req
;
...
...
@@ -861,7 +860,7 @@ int32_t tqProcessTaskRecover1Req(STQ* pTq, SRpcMsg* pMsg) {
memcpy
(
serializedReq
,
&
req
,
len
);
// dispatch msg
tqDebug
(
"s-task:%s st
art recover block
stage(step 2)"
,
pTask
->
id
.
idStr
);
tqDebug
(
"s-task:%s st
ep 1 finished, send msg to start blocking recover
stage(step 2)"
,
pTask
->
id
.
idStr
);
SRpcMsg
rpcMsg
=
{
.
code
=
0
,
.
contLen
=
len
,
.
msgType
=
TDMT_VND_STREAM_RECOVER_BLOCKING_STAGE
,
.
pCont
=
serializedReq
};
...
...
@@ -902,6 +901,7 @@ int32_t tqProcessTaskRecover2Req(STQ* pTq, int64_t sversion, char* msg, int32_t
}
// set status normal
tqDebug
(
"s-task:%s blocking stage completed, set the status to be normal"
,
pTask
->
id
.
idStr
);
code
=
streamSetStatusNormal
(
pTask
);
if
(
code
<
0
)
{
streamMetaReleaseTask
(
pTq
->
pStreamMeta
,
pTask
);
...
...
@@ -909,7 +909,7 @@ int32_t tqProcessTaskRecover2Req(STQ* pTq, int64_t sversion, char* msg, int32_t
}
double
el
=
(
taosGetTimestampMs
()
-
st
)
/
1000
.
0
;
tqDebug
(
"s-task:%s step2 recover finished, el:%.2f
s"
,
pTask
->
id
.
idStr
,
el
);
tqDebug
(
"s-task:%s step2 recover finished, el:%.2fs"
,
pTask
->
id
.
idStr
,
el
);
// dispatch recover finish req to all related downstream task
code
=
streamDispatchRecoverFinishReq
(
pTask
);
...
...
@@ -1367,12 +1367,12 @@ int32_t tqStartStreamTasks(STQ* pTq) {
SStreamTaskRunReq
*
pRunReq
=
rpcMallocCont
(
sizeof
(
SStreamTaskRunReq
));
if
(
pRunReq
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
tqError
(
"vgId:%d failed
restore
stream tasks, code:%s"
,
vgId
,
terrstr
());
tqError
(
"vgId:%d failed
to create msg to start wal scanning to launch
stream tasks, code:%s"
,
vgId
,
terrstr
());
taosWUnLockLatch
(
&
pTq
->
pStreamMeta
->
lock
);
return
-
1
;
}
tqDebug
(
"vgId:%d
start wal scan stream tasks, t
asks:%d"
,
vgId
,
numOfTasks
);
tqDebug
(
"vgId:%d
create msg to start wal scan to launch stream tasks, numOfT
asks:%d"
,
vgId
,
numOfTasks
);
pRunReq
->
head
.
vgId
=
vgId
;
pRunReq
->
streamId
=
0
;
pRunReq
->
taskId
=
WAL_READ_TASKS_ID
;
...
...
source/dnode/vnode/src/tq/tqRestore.c
浏览文件 @
777ed176
...
...
@@ -100,7 +100,7 @@ int32_t createStreamRunReq(SStreamMeta* pStreamMeta, bool* pScanIdle) {
int32_t
status
=
pTask
->
status
.
taskStatus
;
if
(
pTask
->
taskLevel
!=
TASK_LEVEL__SOURCE
)
{
tqDebug
(
"s-task:%s
not source task, no need to start"
,
pTask
->
id
.
idStr
);
tqDebug
(
"s-task:%s
level:%d not source task, no need to start"
,
pTask
->
id
.
idStr
,
pTask
->
taskLevel
);
streamMetaReleaseTask
(
pStreamMeta
,
pTask
);
continue
;
}
...
...
@@ -113,7 +113,7 @@ int32_t createStreamRunReq(SStreamMeta* pStreamMeta, bool* pScanIdle) {
}
if
(
tInputQueueIsFull
(
pTask
))
{
tqDebug
(
"
vgId:%d s-task:%s input queue is full, do nothing"
,
vgId
,
pTask
->
id
.
idStr
);
tqDebug
(
"
s-task:%s input queue is full, do nothing"
,
pTask
->
id
.
idStr
);
streamMetaReleaseTask
(
pStreamMeta
,
pTask
);
continue
;
}
...
...
source/libs/stream/src/stream.c
浏览文件 @
777ed176
...
...
@@ -216,8 +216,8 @@ int32_t streamTaskOutput(SStreamTask* pTask, SStreamDataBlock* pBlock) {
}
int32_t
streamProcessDispatchReq
(
SStreamTask
*
pTask
,
SStreamDispatchReq
*
pReq
,
SRpcMsg
*
pRsp
,
bool
exec
)
{
qDebug
(
"
vgId:%d s-task:%s receive dispatch req from taskId:%d"
,
pReq
->
upstreamNodeId
,
pTask
->
id
.
idStr
,
pReq
->
upstream
Task
Id
);
qDebug
(
"
s-task:%s receive dispatch msg from taskId:%d (vgId:%d)"
,
pTask
->
id
.
idStr
,
pReq
->
upstreamTaskId
,
pReq
->
upstream
Node
Id
);
streamTaskEnqueueBlocks
(
pTask
,
pReq
,
pRsp
);
tDeleteStreamDispatchReq
(
pReq
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录