Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ea875c58
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ea875c58
编写于
8月 01, 2023
作者:
H
Haojun Liao
提交者:
GitHub
8月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #22263 from taosdata/mark/tmq-main
fix:add committed & seek process logic
上级
7e8eccea
68ae64cd
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
10 addition
and
4 deletion
+10
-4
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+2
-1
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+1
-0
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+3
-3
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+4
-0
未找到文件。
source/client/test/clientTests.cpp
浏览文件 @
ea875c58
...
...
@@ -1251,7 +1251,8 @@ TEST(clientCase, td_25129) {
}
for
(
int
i
=
0
;
i
<
numOfAssign
;
i
++
){
printf
(
"assign i:%d, vgId:%d, offset:%lld, start:%lld, end:%lld
\n
"
,
i
,
pAssign
[
i
].
vgId
,
pAssign
[
i
].
currentOffset
,
pAssign
[
i
].
begin
,
pAssign
[
i
].
end
);
int64_t
committed
=
tmq_committed
(
tmq
,
topicName
,
pAssign
[
i
].
vgId
);
printf
(
"assign i:%d, vgId:%d, committed:%lld, offset:%lld, start:%lld, end:%lld
\n
"
,
i
,
pAssign
[
i
].
vgId
,
committed
,
pAssign
[
i
].
currentOffset
,
pAssign
[
i
].
begin
,
pAssign
[
i
].
end
);
}
while
(
1
)
{
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
ea875c58
...
...
@@ -692,6 +692,7 @@ static int32_t mndProcessRebalanceReq(SRpcMsg *pMsg) {
taosArrayDestroy
(
rebOutput
.
modifyConsumers
);
taosArrayDestroy
(
rebOutput
.
rebVgs
);
taosHashCancelIterate
(
pReq
->
rebSubHash
,
pIter
);
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
mInfo
(
"mq re-balance failed, due to out of memory"
);
taosHashCleanup
(
pReq
->
rebSubHash
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
ea875c58
...
...
@@ -336,10 +336,10 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, int64_t sversion, char* msg, int32_t
STqOffset
*
pOffset
=
&
vgOffset
.
offset
;
if
(
pOffset
->
val
.
type
==
TMQ_OFFSET__SNAPSHOT_DATA
||
pOffset
->
val
.
type
==
TMQ_OFFSET__SNAPSHOT_META
)
{
tq
Info
(
"receive offset commit msg to %s on vgId:%d, offset(type:snapshot) uid:%"
PRId64
", ts:%"
PRId64
,
tq
Debug
(
"receive offset commit msg to %s on vgId:%d, offset(type:snapshot) uid:%"
PRId64
", ts:%"
PRId64
,
pOffset
->
subKey
,
vgId
,
pOffset
->
val
.
uid
,
pOffset
->
val
.
ts
);
}
else
if
(
pOffset
->
val
.
type
==
TMQ_OFFSET__LOG
)
{
tq
Info
(
"receive offset commit msg to %s on vgId:%d, offset(type:log) version:%"
PRId64
,
pOffset
->
subKey
,
vgId
,
tq
Debug
(
"receive offset commit msg to %s on vgId:%d, offset(type:log) version:%"
PRId64
,
pOffset
->
subKey
,
vgId
,
pOffset
->
val
.
version
);
}
else
{
tqError
(
"invalid commit offset type:%d"
,
pOffset
->
val
.
type
);
...
...
@@ -367,12 +367,12 @@ int32_t tqProcessSeekReq(STQ* pTq, SRpcMsg* pMsg) {
SRpcMsg
rsp
=
{.
info
=
pMsg
->
info
};
int
code
=
0
;
tqDebug
(
"tmq seek: consumer:0x%"
PRIx64
" vgId:%d, subkey %s"
,
req
.
consumerId
,
vgId
,
req
.
subKey
);
if
(
tDeserializeSMqSeekReq
(
pMsg
->
pCont
,
pMsg
->
contLen
,
&
req
)
<
0
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
end
;
}
tqDebug
(
"tmq seek: consumer:0x%"
PRIx64
" vgId:%d, subkey %s"
,
req
.
consumerId
,
vgId
,
req
.
subKey
);
STqHandle
*
pHandle
=
taosHashGet
(
pTq
->
pHandle
,
req
.
subKey
,
strlen
(
req
.
subKey
));
if
(
pHandle
==
NULL
)
{
tqWarn
(
"tmq seek: consumer:0x%"
PRIx64
" vgId:%d subkey %s not found"
,
req
.
consumerId
,
vgId
,
req
.
subKey
);
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
ea875c58
...
...
@@ -624,6 +624,10 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) {
// return tqProcessPollReq(pVnode->pTq, pMsg);
case
TDMT_VND_TMQ_VG_WALINFO
:
return
tqProcessVgWalInfoReq
(
pVnode
->
pTq
,
pMsg
);
case
TDMT_VND_TMQ_VG_COMMITTEDINFO
:
return
tqProcessVgCommittedInfoReq
(
pVnode
->
pTq
,
pMsg
);
case
TDMT_VND_TMQ_SEEK
:
return
tqProcessSeekReq
(
pVnode
->
pTq
,
pMsg
);
default:
vError
(
"unknown msg type:%d in fetch queue"
,
pMsg
->
msgType
);
return
TSDB_CODE_APP_ERROR
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录