Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
915e5acb
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看板
未验证
提交
915e5acb
编写于
4月 18, 2023
作者:
H
Haojun Liao
提交者:
GitHub
4月 18, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20967 from taosdata/fix/liaohj_main
fix(stream): update the reference count value to be int32
上级
2af63992
fb32ffd9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
10 deletion
+16
-10
include/libs/stream/tstream.h
include/libs/stream/tstream.h
+1
-1
source/dnode/vnode/src/tq/tqRestore.c
source/dnode/vnode/src/tq/tqRestore.c
+15
-9
未找到文件。
include/libs/stream/tstream.h
浏览文件 @
915e5acb
...
...
@@ -345,7 +345,7 @@ typedef struct SStreamMeta {
FTaskExpand
*
expandFunc
;
int32_t
vgId
;
SRWLatch
lock
;
int
8_t
walScan
;
int
32_t
walScan
;
}
SStreamMeta
;
int32_t
tEncodeStreamEpInfo
(
SEncoder
*
pEncoder
,
const
SStreamChildEpInfo
*
pInfo
);
...
...
source/dnode/vnode/src/tq/tqRestore.c
浏览文件 @
915e5acb
...
...
@@ -27,31 +27,37 @@ int tqStreamTasksScanWal(STQ* pTq) {
int64_t
st
=
taosGetTimestampMs
();
while
(
1
)
{
tqInfo
(
"vgId:%d continue check if data in wal are available"
,
vgId
);
int32_t
scan
=
pMeta
->
walScan
;
tqDebug
(
"vgId:%d continue check if data in wal are available, scan:%d"
,
vgId
,
scan
);
// check all restore tasks
bool
allFull
=
true
;
streamTaskReplayWal
(
pTq
->
pStreamMeta
,
pTq
->
pOffsetStore
,
&
allFull
);
bool
shouldIdle
=
true
;
streamTaskReplayWal
(
pTq
->
pStreamMeta
,
pTq
->
pOffsetStore
,
&
shouldIdle
);
int32_t
times
=
0
;
if
(
allFull
)
{
if
(
shouldIdle
)
{
taosWLockLatch
(
&
pMeta
->
lock
);
pMeta
->
walScan
-=
1
;
times
=
pMeta
->
walScan
;
ASSERT
(
pMeta
->
walScan
>=
0
);
if
(
pMeta
->
walScan
<=
0
)
{
taosWUnLockLatch
(
&
pMeta
->
lock
);
break
;
}
taosWUnLockLatch
(
&
pMeta
->
lock
);
tq
Info
(
"vgId:%d scan wal for stream tasks for %d times"
,
vgId
,
times
);
tq
Debug
(
"vgId:%d scan wal for stream tasks for %d times"
,
vgId
,
times
);
}
}
double
el
=
(
taosGetTimestampMs
()
-
st
)
/
1000
.
0
;
tqInfo
(
"vgId:%d scan wal for stream tasks completed, elapsed time:%.2f sec"
,
vgId
,
el
);
int64_t
el
=
(
taosGetTimestampMs
()
-
st
);
tqDebug
(
"vgId:%d scan wal for stream tasks completed, elapsed time:%"
PRId64
" ms"
,
vgId
,
el
);
// restore wal scan flag
// atomic_store_8(&pTq->pStreamMeta->walScan, 0);
return
0
;
}
...
...
@@ -96,8 +102,8 @@ int32_t streamTaskReplayWal(SStreamMeta* pStreamMeta, STqOffsetStore* pOffsetSto
continue
;
}
i
nt8_t
status
=
pTask
->
status
.
taskStatus
;
if
(
status
==
TASK_STATUS__RECOVER_PREPARE
||
s
tatus
==
TASK_STATUS__WAIT_DOWNSTREAM
)
{
i
f
(
pTask
->
status
.
taskStatus
==
TASK_STATUS__RECOVER_PREPARE
||
pTask
->
status
.
taskS
tatus
==
TASK_STATUS__WAIT_DOWNSTREAM
)
{
tqDebug
(
"s-task:%s skip push data, not ready for processing, status %d"
,
pTask
->
id
.
idStr
,
pTask
->
status
.
taskStatus
);
continue
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录