Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
da550029
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看板
提交
da550029
编写于
3月 06, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(tmq): fix memory error and adjust some logs.
上级
b4787cf5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
12 deletion
+14
-12
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+1
-1
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+2
-3
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+5
-3
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+1
-0
tests/script/tsim/tmq/consume.sh
tests/script/tsim/tmq/consume.sh
+5
-5
未找到文件。
source/client/src/clientTmq.c
浏览文件 @
da550029
...
...
@@ -1291,7 +1291,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
tscDebug
(
"consumer:0x%"
PRIx64
" recv poll rsp, vgId:%d, req offset:%"
PRId64
", rsp offset:%"
PRId64
" type %d, reqId:0x%"
PRIx64
,
tmq
->
consumerId
,
pVg
->
vgId
,
pRspWrapper
->
dataRsp
.
reqOffset
.
version
,
pRspWrapper
->
dataRsp
.
rspOffset
.
version
,
rspType
,
pParam
->
requestId
);
rspType
,
requestId
);
}
else
if
(
rspType
==
TMQ_MSG_TYPE__POLL_META_RSP
)
{
SDecoder
decoder
;
tDecoderInit
(
&
decoder
,
POINTER_SHIFT
(
pMsg
->
pData
,
sizeof
(
SMqRspHead
)),
pMsg
->
len
-
sizeof
(
SMqRspHead
));
...
...
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
da550029
...
...
@@ -35,9 +35,9 @@ static const char *mndConsumerStatusName(int status);
static
int32_t
mndConsumerActionInsert
(
SSdb
*
pSdb
,
SMqConsumerObj
*
pConsumer
);
static
int32_t
mndConsumerActionDelete
(
SSdb
*
pSdb
,
SMqConsumerObj
*
pConsumer
);
static
int32_t
mndConsumerActionUpdate
(
SSdb
*
pSdb
,
SMqConsumerObj
*
pConsumer
,
SMqConsumerObj
*
pNewConsumer
);
static
int32_t
mndConsumerActionUpdate
(
SSdb
*
pSdb
,
SMqConsumerObj
*
p
Old
Consumer
,
SMqConsumerObj
*
pNewConsumer
);
static
int32_t
mndProcessConsumerMetaMsg
(
SRpcMsg
*
pMsg
);
static
int32_t
mndRetrieveConsumer
(
SRpcMsg
*
p
Msg
,
SShowObj
*
pShow
,
SSDataBlock
*
pBlock
,
int32_t
rows
);
static
int32_t
mndRetrieveConsumer
(
SRpcMsg
*
p
Req
,
SShowObj
*
pShow
,
SSDataBlock
*
pBlock
,
int32_t
rows
);
static
void
mndCancelGetNextConsumer
(
SMnode
*
pMnode
,
void
*
pIter
);
static
int32_t
mndProcessSubscribeReq
(
SRpcMsg
*
pMsg
);
...
...
@@ -712,7 +712,6 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
// no topics need to be rebalanced
if
(
taosArrayGetSize
(
pConsumerNew
->
rebNewTopics
)
==
0
&&
taosArrayGetSize
(
pConsumerNew
->
rebRemovedTopics
)
==
0
)
{
// mInfo();
goto
_over
;
}
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
da550029
...
...
@@ -444,7 +444,9 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR
static
int32_t
mndPersistRebResult
(
SMnode
*
pMnode
,
SRpcMsg
*
pMsg
,
const
SMqRebOutputObj
*
pOutput
)
{
STrans
*
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_ROLLBACK
,
TRN_CONFLICT_DB_INSIDE
,
pMsg
,
"tmq-reb"
);
if
(
pTrans
==
NULL
)
return
-
1
;
if
(
pTrans
==
NULL
)
{
return
-
1
;
}
mndTransSetDbName
(
pTrans
,
pOutput
->
pSub
->
dbName
,
NULL
);
if
(
mndTrancCheckConflict
(
pMnode
,
pTrans
)
!=
0
)
{
...
...
@@ -616,9 +618,9 @@ static int32_t mndProcessRebalanceReq(SRpcMsg *pMsg) {
// if add more consumer to balanced subscribe,
// possibly no vg is changed
// when each topic is re-balanced, issue an trans to save the results in sdb.
if
(
mndPersistRebResult
(
pMnode
,
pMsg
,
&
rebOutput
)
<
0
)
{
mError
(
"mq re-balance persist
re-balance
output error, possibly vnode splitted or dropped"
);
mError
(
"mq re-balance persist output error, possibly vnode splitted or dropped"
);
}
taosArrayDestroy
(
pRebInfo
->
lostConsumers
);
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
da550029
...
...
@@ -875,6 +875,7 @@ int32_t mndTrancCheckConflict(SMnode *pMnode, STrans *pTrans) {
}
}
if
(
mndCheckTransConflict
(
pMnode
,
pTrans
))
{
terrno
=
TSDB_CODE_MND_TRANS_CONFLICT
;
mError
(
"trans:%d, failed to prepare since %s"
,
pTrans
->
id
,
terrstr
());
...
...
tests/script/tsim/tmq/consume.sh
浏览文件 @
da550029
...
...
@@ -79,15 +79,15 @@ CFG_DIR=$PRG_DIR/cfg
LOG_DIR
=
$PRG_DIR
/log
echo
"------------------------------------------------------------------------"
echo
"TOP_DIR:
$TOP_DIR
"
echo
"BUILD_DIR:
$BUILD_DIR
"
echo
"SIM_DIR :
$SIM_DIR
"
echo
"CFG_DIR :
$CFG_DIR
"
echo
"PROGRAM:
$PROGRAM
echo "
CFG_DIR:
$CFG_DIR
echo
"POLL_DELAY:
$POLL_DELAY
echo "
DB_NAME:
$DB_NAME
echo
"PROGRAM:
$PROGRAM
"
echo
"CFG_DIR:
$CFG_DIR
"
echo
"POLL_DELAY:
$POLL_DELAY
"
echo
"DB_NAME:
$DB_NAME
"
echo
"------------------------------------------------------------------------"
if
[
"
$EXEC_OPTON
"
=
"start"
]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录