Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cde1bee8
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
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,发现更多精彩内容 >>
未验证
提交
cde1bee8
编写于
9月 17, 2022
作者:
L
Liu Jicong
提交者:
GitHub
9月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16890 from taosdata/feature/stream
fix(tmq):fix memory leak
上级
4df695f3
e848dc71
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
80 addition
and
36 deletion
+80
-36
include/common/tmsg.h
include/common/tmsg.h
+1
-1
include/libs/stream/streamState.h
include/libs/stream/streamState.h
+0
-3
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+1
-0
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+4
-2
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+1
-0
source/dnode/mnode/impl/src/mndDef.c
source/dnode/mnode/impl/src/mndDef.c
+15
-13
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+18
-9
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+8
-0
source/dnode/mnode/impl/src/mndTopic.c
source/dnode/mnode/impl/src/mndTopic.c
+13
-0
source/dnode/vnode/src/tq/tqOffset.c
source/dnode/vnode/src/tq/tqOffset.c
+1
-0
source/libs/executor/src/dataDeleter.c
source/libs/executor/src/dataDeleter.c
+3
-0
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+4
-2
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+3
-1
source/util/src/tarray.c
source/util/src/tarray.c
+5
-4
tests/system-test/7-tmq/tmqDelete-multiCtb.py
tests/system-test/7-tmq/tmqDelete-multiCtb.py
+3
-1
未找到文件。
include/common/tmsg.h
浏览文件 @
cde1bee8
...
...
@@ -2956,7 +2956,7 @@ static FORCE_INLINE void* tDecodeSMqSubTopicEp(void* buf, SMqSubTopicEp* pTopicE
}
static
FORCE_INLINE
void
tDeleteSMqSubTopicEp
(
SMqSubTopicEp
*
pSubTopicEp
)
{
// taosMemoryFree
(pSubTopicEp->schema.pSchema);
if
(
pSubTopicEp
->
schema
.
nCols
)
taosMemoryFreeClear
(
pSubTopicEp
->
schema
.
pSchema
);
taosArrayDestroy
(
pSubTopicEp
->
vgs
);
}
...
...
include/libs/stream/streamState.h
浏览文件 @
cde1bee8
...
...
@@ -44,7 +44,6 @@ typedef struct {
TBC
*
pCur
;
}
SStreamStateCur
;
#if 1
int32_t
streamStateFuncPut
(
SStreamState
*
pState
,
const
STupleKey
*
key
,
const
void
*
value
,
int32_t
vLen
);
int32_t
streamStateFuncGet
(
SStreamState
*
pState
,
const
STupleKey
*
key
,
void
**
pVal
,
int32_t
*
pVLen
);
int32_t
streamStateFuncDel
(
SStreamState
*
pState
,
const
STupleKey
*
key
);
...
...
@@ -69,8 +68,6 @@ int32_t streamStateSeekLast(SStreamState* pState, SStreamStateCur* pCur);
int32_t
streamStateCurNext
(
SStreamState
*
pState
,
SStreamStateCur
*
pCur
);
int32_t
streamStateCurPrev
(
SStreamState
*
pState
,
SStreamStateCur
*
pCur
);
#endif
#ifdef __cplusplus
}
#endif
...
...
source/client/src/clientImpl.c
浏览文件 @
cde1bee8
...
...
@@ -438,6 +438,7 @@ void setResSchemaInfo(SReqResultInfo* pResInfo, const SSchema* pSchema, int32_t
}
pResInfo
->
fields
=
taosMemoryCalloc
(
numOfCols
,
sizeof
(
TAOS_FIELD
));
pResInfo
->
userFields
=
taosMemoryCalloc
(
numOfCols
,
sizeof
(
TAOS_FIELD
));
ASSERT
(
numOfCols
==
pResInfo
->
numOfCols
);
for
(
int32_t
i
=
0
;
i
<
pResInfo
->
numOfCols
;
++
i
)
{
pResInfo
->
fields
[
i
].
bytes
=
pSchema
[
i
].
bytes
;
...
...
source/client/src/clientTmq.c
浏览文件 @
cde1bee8
...
...
@@ -841,7 +841,7 @@ void tmqFreeImpl(void* handle) {
int32_t
sz
=
taosArrayGetSize
(
tmq
->
clientTopics
);
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
SMqClientTopic
*
pTopic
=
taosArrayGet
(
tmq
->
clientTopics
,
i
);
if
(
pTopic
->
schema
.
nCols
)
taosMemoryFree
(
pTopic
->
schema
.
pSchema
);
if
(
pTopic
->
schema
.
nCols
)
taosMemoryFree
Clear
(
pTopic
->
schema
.
pSchema
);
int32_t
vgSz
=
taosArrayGetSize
(
pTopic
->
vgs
);
taosArrayDestroy
(
pTopic
->
vgs
);
}
...
...
@@ -1222,6 +1222,8 @@ bool tmqUpdateEp(tmq_t* tmq, int32_t epoch, SMqAskEpRsp* pRsp) {
SMqClientTopic
topic
=
{
0
};
SMqSubTopicEp
*
pTopicEp
=
taosArrayGet
(
pRsp
->
topics
,
i
);
topic
.
schema
=
pTopicEp
->
schema
;
pTopicEp
->
schema
.
nCols
=
0
;
pTopicEp
->
schema
.
pSchema
=
NULL
;
tstrncpy
(
topic
.
topicName
,
pTopicEp
->
topic
,
TSDB_TOPIC_FNAME_LEN
);
tstrncpy
(
topic
.
db
,
pTopicEp
->
db
,
TSDB_DB_FNAME_LEN
);
...
...
@@ -1255,7 +1257,7 @@ bool tmqUpdateEp(tmq_t* tmq, int32_t epoch, SMqAskEpRsp* pRsp) {
int32_t
sz
=
taosArrayGetSize
(
tmq
->
clientTopics
);
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
SMqClientTopic
*
pTopic
=
taosArrayGet
(
tmq
->
clientTopics
,
i
);
if
(
pTopic
->
schema
.
nCols
)
taosMemoryFree
(
pTopic
->
schema
.
pSchema
);
if
(
pTopic
->
schema
.
nCols
)
taosMemoryFree
Clear
(
pTopic
->
schema
.
pSchema
);
int32_t
vgSz
=
taosArrayGetSize
(
pTopic
->
vgs
);
taosArrayDestroy
(
pTopic
->
vgs
);
}
...
...
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
cde1bee8
...
...
@@ -487,6 +487,7 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
pConsumerNew
=
tNewSMqConsumerObj
(
consumerId
,
cgroup
);
tstrncpy
(
pConsumerNew
->
clientId
,
subscribe
.
clientId
,
256
);
pConsumerNew
->
updateType
=
CONSUMER_UPDATE__MODIFY
;
taosArrayDestroy
(
pConsumerNew
->
rebNewTopics
);
pConsumerNew
->
rebNewTopics
=
newSub
;
subscribe
.
topicNames
=
NULL
;
...
...
source/dnode/mnode/impl/src/mndDef.c
浏览文件 @
cde1bee8
...
...
@@ -145,7 +145,10 @@ SMqVgEp *tCloneSMqVgEp(const SMqVgEp *pVgEp) {
}
void
tDeleteSMqVgEp
(
SMqVgEp
*
pVgEp
)
{
if
(
pVgEp
->
qmsg
)
taosMemoryFree
(
pVgEp
->
qmsg
);
if
(
pVgEp
)
{
taosMemoryFreeClear
(
pVgEp
->
qmsg
);
taosMemoryFree
(
pVgEp
);
}
}
int32_t
tEncodeSMqVgEp
(
void
**
buf
,
const
SMqVgEp
*
pVgEp
)
{
...
...
@@ -200,18 +203,10 @@ SMqConsumerObj *tNewSMqConsumerObj(int64_t consumerId, char cgroup[TSDB_CGROUP_L
}
void
tDeleteSMqConsumerObj
(
SMqConsumerObj
*
pConsumer
)
{
if
(
pConsumer
->
currentTopics
)
{
taosArrayDestroyP
(
pConsumer
->
currentTopics
,
(
FDelete
)
taosMemoryFree
);
}
if
(
pConsumer
->
rebNewTopics
)
{
taosArrayDestroyP
(
pConsumer
->
rebNewTopics
,
(
FDelete
)
taosMemoryFree
);
}
if
(
pConsumer
->
rebRemovedTopics
)
{
taosArrayDestroyP
(
pConsumer
->
rebRemovedTopics
,
(
FDelete
)
taosMemoryFree
);
}
if
(
pConsumer
->
assignedTopics
)
{
taosArrayDestroyP
(
pConsumer
->
assignedTopics
,
(
FDelete
)
taosMemoryFree
);
}
}
int32_t
tEncodeSMqConsumerObj
(
void
**
buf
,
const
SMqConsumerObj
*
pConsumer
)
{
...
...
@@ -428,6 +423,13 @@ SMqSubscribeObj *tCloneSubscribeObj(const SMqSubscribeObj *pSub) {
}
void
tDeleteSubscribeObj
(
SMqSubscribeObj
*
pSub
)
{
void
*
pIter
=
NULL
;
while
(
1
)
{
pIter
=
taosHashIterate
(
pSub
->
consumerHash
,
pIter
);
if
(
pIter
==
NULL
)
break
;
SMqConsumerEp
*
pConsumerEp
=
(
SMqConsumerEp
*
)
pIter
;
taosArrayDestroyP
(
pConsumerEp
->
vgs
,
(
FDelete
)
tDeleteSMqVgEp
);
}
taosHashCleanup
(
pSub
->
consumerHash
);
taosArrayDestroyP
(
pSub
->
unassignedVgs
,
(
FDelete
)
tDeleteSMqVgEp
);
}
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
cde1bee8
...
...
@@ -1187,6 +1187,7 @@ static int32_t mndCheckAlterColForTopic(SMnode *pMnode, const char *stbFullName,
if
(
pCol
->
colId
>
0
&&
pCol
->
colId
==
colId
)
{
sdbRelease
(
pSdb
,
pTopic
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
terrno
=
TSDB_CODE_MND_FIELD_CONFLICT_WITH_TOPIC
;
mError
(
"topic:%s, check colId:%d conflicted"
,
pTopic
->
name
,
pCol
->
colId
);
return
-
1
;
...
...
@@ -1197,6 +1198,7 @@ static int32_t mndCheckAlterColForTopic(SMnode *pMnode, const char *stbFullName,
NEXT:
sdbRelease
(
pSdb
,
pTopic
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
}
return
0
;
}
...
...
@@ -1228,6 +1230,7 @@ static int32_t mndCheckAlterColForStream(SMnode *pMnode, const char *stbFullName
if
(
pCol
->
colId
>
0
&&
pCol
->
colId
==
colId
)
{
sdbRelease
(
pSdb
,
pStream
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
terrno
=
TSDB_CODE_MND_STREAM_MUST_BE_DELETED
;
mError
(
"stream:%s, check colId:%d conflicted"
,
pStream
->
name
,
pCol
->
colId
);
return
-
1
;
...
...
@@ -1238,6 +1241,7 @@ static int32_t mndCheckAlterColForStream(SMnode *pMnode, const char *stbFullName
NEXT:
sdbRelease
(
pSdb
,
pStream
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
}
return
0
;
}
...
...
@@ -1275,6 +1279,7 @@ static int32_t mndCheckAlterColForTSma(SMnode *pMnode, const char *stbFullName,
if
((
pCol
->
colId
)
>
0
&&
(
pCol
->
colId
==
colId
))
{
sdbRelease
(
pSdb
,
pSma
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
terrno
=
TSDB_CODE_MND_FIELD_CONFLICT_WITH_TSMA
;
mError
(
"tsma:%s, check colId:%d conflicted"
,
pSma
->
name
,
pCol
->
colId
);
return
-
1
;
...
...
@@ -1285,6 +1290,7 @@ static int32_t mndCheckAlterColForTSma(SMnode *pMnode, const char *stbFullName,
NEXT:
sdbRelease
(
pSdb
,
pSma
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
}
return
0
;
}
...
...
@@ -1774,7 +1780,7 @@ static int32_t mndBuildSMAlterStbRsp(SDbObj *pDb, SStbObj *pObj, void **pCont, i
return
0
;
}
int32_t
mndBuildSMCreateStbRsp
(
SMnode
*
pMnode
,
char
*
dbFName
,
char
*
stbFName
,
void
**
pCont
,
int32_t
*
pLen
)
{
int32_t
mndBuildSMCreateStbRsp
(
SMnode
*
pMnode
,
char
*
dbFName
,
char
*
stbFName
,
void
**
pCont
,
int32_t
*
pLen
)
{
int32_t
ret
=
-
1
;
SDbObj
*
pDb
=
mndAcquireDb
(
pMnode
,
dbFName
);
if
(
NULL
==
pDb
)
{
...
...
@@ -1834,7 +1840,6 @@ _OVER:
return
ret
;
}
static
int32_t
mndAlterStbImp
(
SMnode
*
pMnode
,
SRpcMsg
*
pReq
,
SDbObj
*
pDb
,
SStbObj
*
pStb
,
bool
needRsp
,
void
*
alterOriData
,
int32_t
alterOriDataLen
)
{
int32_t
code
=
-
1
;
...
...
@@ -2091,6 +2096,7 @@ static int32_t mndCheckDropStbForTopic(SMnode *pMnode, const char *stbFullName,
if
(
pCol
->
tableId
==
suid
)
{
sdbRelease
(
pSdb
,
pTopic
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
return
-
1
;
}
else
{
goto
NEXT
;
...
...
@@ -2099,6 +2105,7 @@ static int32_t mndCheckDropStbForTopic(SMnode *pMnode, const char *stbFullName,
NEXT:
sdbRelease
(
pSdb
,
pTopic
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
}
return
0
;
}
...
...
@@ -2136,6 +2143,7 @@ static int32_t mndCheckDropStbForStream(SMnode *pMnode, const char *stbFullName,
if
(
pCol
->
tableId
==
suid
)
{
sdbRelease
(
pSdb
,
pStream
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
return
-
1
;
}
else
{
goto
NEXT
;
...
...
@@ -2144,6 +2152,7 @@ static int32_t mndCheckDropStbForStream(SMnode *pMnode, const char *stbFullName,
NEXT:
sdbRelease
(
pSdb
,
pStream
);
nodesDestroyNode
(
pAst
);
nodesDestroyList
(
pNodeList
);
}
return
0
;
}
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
cde1bee8
...
...
@@ -490,8 +490,12 @@ static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOu
mndReleaseConsumer
(
pMnode
,
pConsumerOld
);
if
(
mndSetConsumerCommitLogs
(
pMnode
,
pTrans
,
pConsumerNew
)
!=
0
)
{
ASSERT
(
0
);
tDeleteSMqConsumerObj
(
pConsumerNew
);
taosMemoryFree
(
pConsumerNew
);
goto
REB_FAIL
;
}
tDeleteSMqConsumerObj
(
pConsumerNew
);
taosMemoryFree
(
pConsumerNew
);
}
// 3.3 set removed consumer
...
...
@@ -509,8 +513,12 @@ static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOu
mndReleaseConsumer
(
pMnode
,
pConsumerOld
);
if
(
mndSetConsumerCommitLogs
(
pMnode
,
pTrans
,
pConsumerNew
)
!=
0
)
{
ASSERT
(
0
);
tDeleteSMqConsumerObj
(
pConsumerNew
);
taosMemoryFree
(
pConsumerNew
);
goto
REB_FAIL
;
}
tDeleteSMqConsumerObj
(
pConsumerNew
);
taosMemoryFree
(
pConsumerNew
);
}
#if 0
if (consumerNum) {
...
...
source/dnode/mnode/impl/src/mndTopic.c
浏览文件 @
cde1bee8
...
...
@@ -224,6 +224,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
if
(
taosDecodeSSchemaWrapper
(
buf
,
&
pTopic
->
schema
)
==
NULL
)
{
goto
TOPIC_DECODE_OVER
;
}
taosMemoryFree
(
buf
);
}
else
{
pTopic
->
schema
.
nCols
=
0
;
pTopic
->
schema
.
version
=
0
;
...
...
@@ -266,6 +267,11 @@ static int32_t mndTopicActionInsert(SSdb *pSdb, SMqTopicObj *pTopic) {
static
int32_t
mndTopicActionDelete
(
SSdb
*
pSdb
,
SMqTopicObj
*
pTopic
)
{
mTrace
(
"topic:%s, perform delete action"
,
pTopic
->
name
);
taosMemoryFreeClear
(
pTopic
->
sql
);
taosMemoryFreeClear
(
pTopic
->
ast
);
taosMemoryFreeClear
(
pTopic
->
physicalPlan
);
if
(
pTopic
->
schema
.
nCols
)
taosMemoryFreeClear
(
pTopic
->
schema
.
pSchema
);
taosArrayDestroy
(
pTopic
->
ntbColIds
);
return
0
;
}
...
...
@@ -347,6 +353,7 @@ static int32_t extractTopicTbInfo(SNode *pAst, SMqTopicObj *pTopic) {
}
}
}
nodesDestroyList
(
pNodeList
);
return
0
;
}
...
...
@@ -416,6 +423,8 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
taosMemoryFree
(
topicObj
.
sql
);
return
-
1
;
}
nodesDestroyNode
(
pAst
);
nodesDestroyNode
((
SNode
*
)
pPlan
);
}
else
if
(
pCreate
->
subType
==
TOPIC_SUB_TYPE__TABLE
)
{
SStbObj
*
pStb
=
mndAcquireStb
(
pMnode
,
pCreate
->
subStbName
);
if
(
pStb
==
NULL
)
{
...
...
@@ -512,6 +521,10 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
}
taosMemoryFreeClear
(
topicObj
.
physicalPlan
);
taosMemoryFreeClear
(
topicObj
.
sql
);
taosMemoryFreeClear
(
topicObj
.
ast
);
taosArrayDestroy
(
topicObj
.
ntbColIds
);
if
(
topicObj
.
schema
.
nCols
)
taosMemoryFreeClear
(
topicObj
.
schema
.
pSchema
);
mndTransDrop
(
pTrans
);
return
TSDB_CODE_ACTION_IN_PROGRESS
;
}
...
...
source/dnode/vnode/src/tq/tqOffset.c
浏览文件 @
cde1bee8
...
...
@@ -147,6 +147,7 @@ int32_t tqOffsetCommitFile(STqOffsetStore* pStore) {
taosHashCancelIterate
(
pStore
->
pHash
,
pIter
);
return
-
1
;
}
taosMemoryFree
(
buf
);
}
// close and rename file
taosCloseFile
(
&
pFile
);
...
...
source/libs/executor/src/dataDeleter.c
浏览文件 @
cde1bee8
...
...
@@ -93,6 +93,7 @@ static void toDataCacheEntry(SDataDeleterHandle* pHandle, const SInputData* pInp
strcpy
(
pRes
->
tableName
,
pHandle
->
pDeleter
->
tableFName
);
strcpy
(
pRes
->
tsColName
,
pHandle
->
pDeleter
->
tsColName
);
pRes
->
affectedRows
=
*
(
int64_t
*
)
pColRes
->
pData
;
if
(
pRes
->
affectedRows
)
{
pRes
->
skey
=
*
(
int64_t
*
)
pColSKey
->
pData
;
pRes
->
ekey
=
*
(
int64_t
*
)
pColEKey
->
pData
;
...
...
@@ -102,6 +103,8 @@ static void toDataCacheEntry(SDataDeleterHandle* pHandle, const SInputData* pInp
pRes
->
ekey
=
pHandle
->
pDeleter
->
deleteTimeRange
.
ekey
;
}
qDebug
(
"delete %ld rows, from %ld to %ld"
,
pRes
->
affectedRows
,
pRes
->
skey
,
pRes
->
ekey
);
pBuf
->
useSize
+=
pEntry
->
dataLen
;
atomic_add_fetch_64
(
&
pHandle
->
cachedSize
,
pEntry
->
dataLen
);
...
...
source/libs/executor/src/executor.c
浏览文件 @
cde1bee8
...
...
@@ -268,7 +268,7 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
STableListInfo
*
pListInfo
=
&
pTaskInfo
->
tableqinfoList
;
if
(
isAdd
)
{
qDebug
(
"add %d tables id into query list, %s"
,
(
int32_t
)
taosArrayGetSize
(
tableIdList
),
pTaskInfo
->
id
.
str
);
qDebug
(
"add %d tables id into query list, %s"
,
(
int32_t
)
taosArrayGetSize
(
tableIdList
),
pTaskInfo
->
id
.
str
);
}
if
(
pListInfo
->
map
==
NULL
)
{
...
...
@@ -321,6 +321,7 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
}
bool
exists
=
false
;
#if 0
for (int32_t k = 0; k < taosArrayGetSize(pListInfo->pTableList); ++k) {
STableKeyInfo* pKeyInfo = taosArrayGet(pListInfo->pTableList, k);
if (pKeyInfo->uid == keyInfo.uid) {
...
...
@@ -328,6 +329,7 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
exists = true;
}
}
#endif
if
(
!
exists
)
{
taosArrayPush
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
&
keyInfo
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
cde1bee8
...
...
@@ -637,7 +637,8 @@ static SSDataBlock* doTableScan(SOperatorInfo* pOperator) {
STableKeyInfo
*
pTableInfo
=
taosArrayGet
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
pInfo
->
currentTable
);
tsdbSetTableId
(
pInfo
->
dataReader
,
pTableInfo
->
uid
);
qDebug
(
"set uid:%"
PRIu64
" into scanner, total tables:%d, index:%d %s"
,
pTableInfo
->
uid
,
numOfTables
,
pInfo
->
currentTable
,
pTaskInfo
->
id
.
str
);
qDebug
(
"set uid:%"
PRIu64
" into scanner, total tables:%d, index:%d %s"
,
pTableInfo
->
uid
,
numOfTables
,
pInfo
->
currentTable
,
pTaskInfo
->
id
.
str
);
tsdbReaderReset
(
pInfo
->
dataReader
,
&
pInfo
->
cond
);
pInfo
->
scanTimes
=
0
;
...
...
@@ -1332,6 +1333,7 @@ static void checkUpdateData(SStreamScanInfo* pInfo, bool invertible, SSDataBlock
bool
closedWin
=
isClosed
&&
isSignleIntervalWindow
(
pInfo
)
&&
isDeletedWindow
(
&
win
,
pBlock
->
info
.
groupId
,
pInfo
->
windowSup
.
pIntervalAggSup
);
if
((
update
||
closedWin
)
&&
out
)
{
qDebug
(
"stream update check not pass, update %d, closedWin %d"
,
update
,
closedWin
);
uint64_t
gpId
=
closedWin
&&
pInfo
->
partitionSup
.
needCalc
?
calGroupIdByData
(
&
pInfo
->
partitionSup
,
pInfo
->
pPartScalarSup
,
pBlock
,
rowId
)
:
0
;
...
...
source/util/src/tarray.c
浏览文件 @
cde1bee8
...
...
@@ -386,11 +386,12 @@ void* taosArrayDestroy(SArray* pArray) {
}
void
taosArrayDestroyP
(
SArray
*
pArray
,
FDelete
fp
)
{
if
(
!
pArray
)
return
;
if
(
pArray
)
{
for
(
int32_t
i
=
0
;
i
<
pArray
->
size
;
i
++
)
{
fp
(
*
(
void
**
)
TARRAY_GET_ELEM
(
pArray
,
i
));
}
taosArrayDestroy
(
pArray
);
}
}
void
taosArrayDestroyEx
(
SArray
*
pArray
,
FDelete
fp
)
{
...
...
tests/system-test/7-tmq/tmqDelete-multiCtb.py
浏览文件 @
cde1bee8
...
...
@@ -325,7 +325,9 @@ class TDTestCase:
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
1
+
1
/
4
+
3
/
4
))
elif
self
.
snapshot
==
1
:
consumerId
=
5
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
1
-
1
/
4
+
1
/
4
+
3
/
4
))
# expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 - 1/4 + 1/4 + 3/4))
# fix case: sometimes only 200 rows are deleted
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
1
+
1
/
4
+
3
/
4
))
topicList
=
topicFromStb1
ifcheckdata
=
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录