Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
34a62c3f
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看板
提交
34a62c3f
编写于
7月 05, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:vginfo assigment not in same time,we should get vginfo by vg,not all vg
上级
bdfeb329
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
8 deletion
+11
-8
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+8
-6
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+1
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-1
未找到文件。
source/client/src/clientTmq.c
浏览文件 @
34a62c3f
...
...
@@ -2565,15 +2565,15 @@ int32_t tmq_get_topic_assignment(tmq_t* tmq, const char* pTopicName, tmq_topic_a
}
bool
needFetch
=
false
;
int32_t
index
=
0
;
for
(
int32_t
j
=
0
;
j
<
(
*
numOfAssignment
);
++
j
)
{
SMqClientVg
*
pClientVg
=
taosArrayGet
(
pTopic
->
vgs
,
j
);
if
(
!
pClientVg
->
receivedInfoFromVnode
)
{
needFetch
=
true
;
break
;
continue
;
}
tmq_topic_assignment
*
pAssignment
=
&
(
*
assignment
)[
j
];
tmq_topic_assignment
*
pAssignment
=
&
(
*
assignment
)[
index
++
];
if
(
pClientVg
->
offsetInfo
.
currentOffset
.
type
==
TMQ_OFFSET__LOG
)
{
pAssignment
->
currentOffset
=
pClientVg
->
offsetInfo
.
currentOffset
.
version
;
}
else
{
...
...
@@ -2603,7 +2603,9 @@ int32_t tmq_get_topic_assignment(tmq_t* tmq, const char* pTopicName, tmq_topic_a
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
for
(
int32_t
i
=
0
;
i
<
(
*
numOfAssignment
);
++
i
)
{
SMqClientVg
*
pClientVg
=
taosArrayGet
(
pTopic
->
vgs
,
i
);
if
(
pClientVg
->
receivedInfoFromVnode
)
{
continue
;
}
SMqVgWalInfoParam
*
pParam
=
taosMemoryMalloc
(
sizeof
(
SMqVgWalInfoParam
));
if
(
pParam
==
NULL
)
{
destroyCommonInfo
(
pCommon
);
...
...
@@ -2674,11 +2676,11 @@ int32_t tmq_get_topic_assignment(tmq_t* tmq, const char* pTopicName, tmq_topic_a
}
else
{
int32_t
num
=
taosArrayGetSize
(
pCommon
->
pList
);
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
(
*
assignment
)[
i
]
=
*
(
tmq_topic_assignment
*
)
taosArrayGet
(
pCommon
->
pList
,
i
);
(
*
assignment
)[
i
ndex
++
]
=
*
(
tmq_topic_assignment
*
)
taosArrayGet
(
pCommon
->
pList
,
i
);
tscInfo
(
"consumer:0x%"
PRIx64
" get assignment from server:%d->%"
PRId64
,
tmq
->
consumerId
,
(
*
assignment
)[
i
].
vgId
,
(
*
assignment
)[
i
].
currentOffset
);
}
*
numOfAssignment
=
num
;
*
numOfAssignment
=
index
;
}
// for (int32_t j = 0; j < (*numOfAssignment); ++j) {
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
34a62c3f
...
...
@@ -275,7 +275,7 @@ static void doAddNewConsumers(SMqRebOutputObj *pOutput, const SMqRebInputObj *pI
taosHashPut
(
pOutput
->
pSub
->
consumerHash
,
&
consumerId
,
sizeof
(
int64_t
),
&
newConsumerEp
,
sizeof
(
SMqConsumerEp
));
taosArrayPush
(
pOutput
->
newConsumers
,
&
consumerId
);
mInfo
(
"sub:%s mq rebalance add new consumer:%"
PRIx64
,
pSubKey
,
consumerId
);
mInfo
(
"sub:%s mq rebalance add new consumer:
0x
%"
PRIx64
,
pSubKey
,
consumerId
);
}
}
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
34a62c3f
...
...
@@ -571,7 +571,7 @@ int32_t tqProcessVgWalInfoReq(STQ* pTq, SRpcMsg* pMsg) {
dataRsp
.
rspOffset
.
type
=
TMQ_OFFSET__LOG
;
dataRsp
.
rspOffset
.
version
=
pOffset
->
val
.
version
;
tqInfo
(
"consumer:0x%"
PRIx64
" vgId:%d subkey:%s get assignment from st
ro
e:%"
PRId64
,
consumerId
,
vgId
,
req
.
subKey
,
dataRsp
.
rspOffset
.
version
);
tqInfo
(
"consumer:0x%"
PRIx64
" vgId:%d subkey:%s get assignment from st
or
e:%"
PRId64
,
consumerId
,
vgId
,
req
.
subKey
,
dataRsp
.
rspOffset
.
version
);
}
else
{
if
(
req
.
useSnapshot
==
true
)
{
tqError
(
"consumer:0x%"
PRIx64
" vgId:%d subkey:%s snapshot not support wal info"
,
consumerId
,
vgId
,
req
.
subKey
);
...
...
@@ -593,6 +593,7 @@ int32_t tqProcessVgWalInfoReq(STQ* pTq, SRpcMsg* pMsg) {
tDeleteMqDataRsp
(
&
dataRsp
);
return
-
1
;
}
tqInfo
(
"consumer:0x%"
PRIx64
" vgId:%d subkey:%s get assignment from init:%"
PRId64
,
consumerId
,
vgId
,
req
.
subKey
,
dataRsp
.
rspOffset
.
version
);
}
tqDoSendDataRsp
(
&
pMsg
->
info
,
&
dataRsp
,
req
.
epoch
,
req
.
consumerId
,
TMQ_MSG_TYPE__WALINFO_RSP
,
sver
,
ever
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录