Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8641cfe2
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看板
提交
8641cfe2
编写于
4月 09, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change test
上级
dff06409
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
source/client/src/tmq.c
source/client/src/tmq.c
+2
-2
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+3
-3
tests/test/c/tmqSim.c
tests/test/c/tmqSim.c
+1
-1
未找到文件。
source/client/src/tmq.c
浏览文件 @
8641cfe2
...
...
@@ -1044,7 +1044,7 @@ int32_t tmqAskEp(tmq_t* tmq, bool sync) {
int8_t
epStatus
=
atomic_val_compare_exchange_8
(
&
tmq
->
epStatus
,
0
,
1
);
if
(
epStatus
==
1
)
{
int32_t
epSkipCnt
=
atomic_add_fetch_32
(
&
tmq
->
epSkipCnt
,
1
);
tsc
Debug
(
"consumer %ld skip ask ep cnt %d"
,
tmq
->
consumerId
,
epSkipCnt
);
tsc
Trace
(
"consumer %ld skip ask ep cnt %d"
,
tmq
->
consumerId
,
epSkipCnt
);
if
(
epSkipCnt
<
5000
)
return
0
;
}
atomic_store_32
(
&
tmq
->
epSkipCnt
,
0
);
...
...
@@ -1235,7 +1235,7 @@ int32_t tmqPollImpl(tmq_t* tmq, int64_t blockingTime) {
int32_t
vgStatus
=
atomic_val_compare_exchange_32
(
&
pVg
->
vgStatus
,
TMQ_VG_STATUS__IDLE
,
TMQ_VG_STATUS__WAIT
);
if
(
vgStatus
!=
TMQ_VG_STATUS__IDLE
)
{
int32_t
vgSkipCnt
=
atomic_add_fetch_32
(
&
pVg
->
vgSkipCnt
,
1
);
tsc
Debug
(
"consumer %ld epoch %d skip vg %d skip cnt %d"
,
tmq
->
consumerId
,
tmq
->
epoch
,
pVg
->
vgId
,
vgSkipCnt
);
tsc
Trace
(
"consumer %ld epoch %d skip vg %d skip cnt %d"
,
tmq
->
consumerId
,
tmq
->
epoch
,
pVg
->
vgId
,
vgSkipCnt
);
continue
;
/*if (vgSkipCnt < 10000) continue;*/
#if 0
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
8641cfe2
...
...
@@ -316,7 +316,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) {
return
0
;
}
vDebug
(
"poll topic %s from consumer %ld (epoch %d)
%s"
,
pTopic
->
topicName
,
consumerId
,
pReq
->
epoch
,
pTopic
->
topicName
);
vDebug
(
"poll topic %s from consumer %ld (epoch %d)
vg %d"
,
pTopic
->
topicName
,
consumerId
,
pReq
->
epoch
,
pTq
->
pVnode
->
vgId
);
rsp
.
reqOffset
=
pReq
->
currentOffset
;
rsp
.
skipLogNum
=
0
;
...
...
@@ -325,8 +325,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) {
/*if (fetchOffset > walGetLastVer(pTq->pWal) || walReadWithHandle(pTopic->pReadhandle, fetchOffset) < 0) {*/
// TODO
consumerEpoch
=
atomic_load_32
(
&
pConsumer
->
epoch
);
if
(
consumerEpoch
>
pReq
->
e
poch
)
{
// TODO: return
if
(
consumerEpoch
>
reqE
poch
)
{
vDebug
(
"tmq poll: consumer %ld (epoch %d) vg %d offset %ld, found new consumer epoch %d discard req epoch %d"
,
consumerId
,
pReq
->
epoch
,
pTq
->
pVnode
->
vgId
,
fetchOffset
,
consumerEpoch
,
reqEpoch
);
break
;
}
SWalReadHead
*
pHead
;
...
...
tests/test/c/tmqSim.c
浏览文件 @
8641cfe2
...
...
@@ -226,7 +226,7 @@ void loop_consume(tmq_t* tmq) {
int32_t
totalRows
=
0
;
int32_t
skipLogNum
=
0
;
while
(
running
)
{
tmq_message_t
*
tmqMsg
=
tmq_consumer_poll
(
tmq
,
4
000
);
tmq_message_t
*
tmqMsg
=
tmq_consumer_poll
(
tmq
,
8
000
);
if
(
tmqMsg
)
{
totalMsgs
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录