Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2f6c5653
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
2f6c5653
编写于
7月 28, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:pHandle not load if taosd restart
上级
5fa58096
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
9 deletion
+17
-9
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+2
-2
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+12
-4
source/dnode/vnode/src/tq/tqMeta.c
source/dnode/vnode/src/tq/tqMeta.c
+3
-3
未找到文件。
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
2f6c5653
...
...
@@ -94,7 +94,7 @@ void mndDropConsumerFromSdb(SMnode *pMnode, int64_t consumerId){
bool
mndRebTryStart
()
{
int32_t
old
=
atomic_val_compare_exchange_32
(
&
mqRebInExecCnt
,
0
,
1
);
m
Info
(
"tq timer, rebalance counter old val:%d"
,
old
);
m
Debug
(
"tq timer, rebalance counter old val:%d"
,
old
);
return
old
==
0
;
}
...
...
@@ -116,7 +116,7 @@ void mndRebCntDec() {
int32_t
newVal
=
val
-
1
;
int32_t
oldVal
=
atomic_val_compare_exchange_32
(
&
mqRebInExecCnt
,
val
,
newVal
);
if
(
oldVal
==
val
)
{
m
Info
(
"rebalance trans end, rebalance counter:%d"
,
newVal
);
m
Debug
(
"rebalance trans end, rebalance counter:%d"
,
newVal
);
break
;
}
}
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
2f6c5653
...
...
@@ -522,10 +522,18 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
// 1. find handle
pHandle
=
taosHashGet
(
pTq
->
pHandle
,
req
.
subKey
,
strlen
(
req
.
subKey
));
if
(
pHandle
==
NULL
)
{
tqError
(
"tmq poll: consumer:0x%"
PRIx64
" vgId:%d subkey %s not found"
,
consumerId
,
vgId
,
req
.
subKey
);
terrno
=
TSDB_CODE_INVALID_MSG
;
taosWUnLockLatch
(
&
pTq
->
lock
);
return
-
1
;
do
{
if
(
tqMetaGetHandle
(
pTq
,
req
.
subKey
)
==
0
){
pHandle
=
taosHashGet
(
pTq
->
pHandle
,
req
.
subKey
,
strlen
(
req
.
subKey
));
if
(
pHandle
!=
NULL
){
break
;
}
}
tqError
(
"tmq poll: consumer:0x%"
PRIx64
" vgId:%d subkey %s not found"
,
consumerId
,
vgId
,
req
.
subKey
);
terrno
=
TSDB_CODE_INVALID_MSG
;
taosWUnLockLatch
(
&
pTq
->
lock
);
return
-
1
;
}
while
(
0
);
}
// 2. check re-balance status
...
...
source/dnode/vnode/src/tq/tqMeta.c
浏览文件 @
2f6c5653
...
...
@@ -338,7 +338,7 @@ static int buildHandle(STQ* pTq, STqHandle* handle){
taosArrayDestroy
(
tbUidList
);
return
-
1
;
}
tq
Debug
(
"vgId:%d, tq try to get ctb for stb subscribe, suid:%"
PRId64
,
pVnode
->
config
.
vgId
,
handle
->
execHandle
.
execTb
.
suid
);
tq
Info
(
"vgId:%d, tq try to get ctb for stb subscribe, suid:%"
PRId64
,
pVnode
->
config
.
vgId
,
handle
->
execHandle
.
execTb
.
suid
);
handle
->
execHandle
.
pTqReader
=
tqReaderOpen
(
pVnode
);
tqReaderSetTbUidList
(
handle
->
execHandle
.
pTqReader
,
tbUidList
,
NULL
);
taosArrayDestroy
(
tbUidList
);
...
...
@@ -356,7 +356,7 @@ static int restoreHandle(STQ* pTq, void* pVal, int vLen, STqHandle* handle){
if
(
buildHandle
(
pTq
,
handle
)
<
0
){
return
-
1
;
}
tq
Debug
(
"tq restore %s consumer %"
PRId64
" vgId:%d"
,
handle
->
subKey
,
handle
->
consumerId
,
vgId
);
tq
Info
(
"tq restore %s consumer %"
PRId64
" vgId:%d"
,
handle
->
subKey
,
handle
->
consumerId
,
vgId
);
return
taosHashPut
(
pTq
->
pHandle
,
handle
->
subKey
,
strlen
(
handle
->
subKey
),
handle
,
sizeof
(
STqHandle
));
}
...
...
@@ -384,7 +384,7 @@ int32_t tqCreateHandle(STQ* pTq, SMqRebVgReq* req, STqHandle* handle){
if
(
buildHandle
(
pTq
,
handle
)
<
0
){
return
-
1
;
}
tq
Debug
(
"tq restore %s consumer %"
PRId64
" vgId:%d"
,
handle
->
subKey
,
handle
->
consumerId
,
vgId
);
tq
Info
(
"tq restore %s consumer %"
PRId64
" vgId:%d"
,
handle
->
subKey
,
handle
->
consumerId
,
vgId
);
return
taosHashPut
(
pTq
->
pHandle
,
handle
->
subKey
,
strlen
(
handle
->
subKey
),
handle
,
sizeof
(
STqHandle
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录