Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1c63408b
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看板
提交
1c63408b
编写于
4月 24, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
opti:change push mgr to consume msg for subscribe
上级
168e6f89
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
9 deletion
+6
-9
include/libs/wal/wal.h
include/libs/wal/wal.h
+0
-2
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+4
-3
source/libs/wal/src/walRead.c
source/libs/wal/src/walRead.c
+2
-4
未找到文件。
include/libs/wal/wal.h
浏览文件 @
1c63408b
...
...
@@ -149,8 +149,6 @@ typedef struct SWalReader {
int64_t
capacity
;
// int8_t curInvalid;
// int8_t curStopped;
int64_t
bodyCnt
;
int64_t
bodyTotalSize
;
TdThreadMutex
mutex
;
SWalFilterCond
cond
;
// TODO remove it
...
...
source/client/src/clientTmq.c
浏览文件 @
1c63408b
...
...
@@ -1702,7 +1702,7 @@ static int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) {
for
(
int
j
=
0
;
j
<
numOfVg
;
j
++
)
{
SMqClientVg
*
pVg
=
taosArrayGet
(
pTopic
->
vgs
,
j
);
if
(
taosGetTimestampMs
()
-
pVg
->
emptyBlockReceiveTs
<
EMPTY_BLOCK_POLL_IDLE_DURATION
)
{
// less than 100ms
tsc
Debug
(
"consumer:0x%"
PRIx64
" epoch %d, vgId:%d idle for 10ms before start next poll"
,
tmq
->
consumerId
,
tsc
Trace
(
"consumer:0x%"
PRIx64
" epoch %d, vgId:%d idle for 10ms before start next poll"
,
tmq
->
consumerId
,
tmq
->
epoch
,
pVg
->
vgId
);
continue
;
}
...
...
@@ -1710,7 +1710,7 @@ static int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) {
int32_t
vgStatus
=
atomic_val_compare_exchange_32
(
&
pVg
->
vgStatus
,
TMQ_VG_STATUS__IDLE
,
TMQ_VG_STATUS__WAIT
);
if
(
vgStatus
==
TMQ_VG_STATUS__WAIT
)
{
int32_t
vgSkipCnt
=
atomic_add_fetch_32
(
&
pVg
->
vgSkipCnt
,
1
);
tsc
Debug
(
"consumer:0x%"
PRIx64
" epoch %d wait poll-rsp, skip vgId:%d skip cnt %d"
,
tmq
->
consumerId
,
tmq
->
epoch
,
tsc
Trace
(
"consumer:0x%"
PRIx64
" epoch %d wait poll-rsp, skip vgId:%d skip cnt %d"
,
tmq
->
consumerId
,
tmq
->
epoch
,
pVg
->
vgId
,
vgSkipCnt
);
continue
;
#if 0
...
...
@@ -1805,12 +1805,13 @@ static void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) {
" total:%"
PRId64
" reqId:0x%"
PRIx64
,
tmq
->
consumerId
,
pVg
->
vgId
,
buf
,
pVg
->
numOfRows
,
tmq
->
totalRows
,
pollRspWrapper
->
reqId
);
pRspWrapper
=
tmqFreeRspWrapper
(
pRspWrapper
);
pVg
->
emptyBlockReceiveTs
=
taosGetTimestampMs
();
taosFreeQitem
(
pollRspWrapper
);
}
else
{
// build rsp
int64_t
numOfRows
=
0
;
SMqRspObj
*
pRsp
=
tmqBuildRspFromWrapper
(
pollRspWrapper
,
pVg
,
&
numOfRows
);
tmq
->
totalRows
+=
numOfRows
;
pVg
->
emptyBlockReceiveTs
=
0
;
tscDebug
(
"consumer:0x%"
PRIx64
" process poll rsp, vgId:%d, offset:%s, blocks:%d, rows:%"
PRId64
" vg total:%"
PRId64
" total:%"
PRId64
", reqId:0x%"
PRIx64
,
tmq
->
consumerId
,
pVg
->
vgId
,
buf
,
pDataRsp
->
blockNum
,
numOfRows
,
pVg
->
numOfRows
,
tmq
->
totalRows
,
...
...
source/libs/wal/src/walRead.c
浏览文件 @
1c63408b
...
...
@@ -262,8 +262,8 @@ static int32_t walFetchBodyNew(SWalReader *pReader) {
SWalCont
*
pReadHead
=
&
pReader
->
pHead
->
head
;
int64_t
ver
=
pReadHead
->
version
;
wDebug
(
"vgId:%d, wal starts to fetch body, ver:%"
PRId64
" ,len:%d, total
cnt:%"
PRId64
", total size:%"
PRId64
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
,
pReadHead
->
bodyLen
,
pReader
->
bodyCnt
,
pReader
->
bodyTotalSize
);
wDebug
(
"vgId:%d, wal starts to fetch body, ver:%"
PRId64
" ,len:%d, total
"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
,
pReadHead
->
bodyLen
);
if
(
pReader
->
capacity
<
pReadHead
->
bodyLen
)
{
SWalCkHead
*
ptr
=
(
SWalCkHead
*
)
taosMemoryRealloc
(
pReader
->
pHead
,
sizeof
(
SWalCkHead
)
+
pReadHead
->
bodyLen
);
...
...
@@ -300,8 +300,6 @@ static int32_t walFetchBodyNew(SWalReader *pReader) {
wDebug
(
"vgId:%d, index:%"
PRId64
" is fetched, cursor advance"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
);
pReader
->
curVersion
=
ver
+
1
;
pReader
->
bodyCnt
++
;
pReader
->
bodyTotalSize
+=
pReadHead
->
bodyLen
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录