Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4a42f6b9
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看板
提交
4a42f6b9
编写于
5月 25, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix error in api call.
上级
a9b18d20
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
22 addition
and
6 deletion
+22
-6
include/libs/executor/storageapi.h
include/libs/executor/storageapi.h
+1
-1
source/dnode/mnode/impl/src/mndQuery.c
source/dnode/mnode/impl/src/mndQuery.c
+1
-0
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+4
-0
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-0
source/dnode/vnode/src/vnd/vnodeInitApi.c
source/dnode/vnode/src/vnd/vnodeInitApi.c
+1
-0
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+2
-0
source/libs/executor/src/sysscanoperator.c
source/libs/executor/src/sysscanoperator.c
+6
-2
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+5
-3
未找到文件。
include/libs/executor/storageapi.h
浏览文件 @
4a42f6b9
...
...
@@ -396,7 +396,7 @@ int32_t metaPutTbGroupToCache(SMeta* pMeta, uint64_t suid, const void* pKey, in
int32_t
(
*
getNumOfChildTables
)(
void
*
pVnode
,
int64_t
uid
,
int64_t
*
numOfTables
);
// int32_t metaGetStbStats(SMeta *pMeta, int64_t uid, SMetaStbStats *pInfo);
void
(
*
getBasicInfo
)(
void
*
pVnode
,
const
char
**
dbname
,
int32_t
*
vgId
,
int64_t
*
numOfTables
,
int64_t
*
numOfNormalTables
);
// vnodeGetInfo(void *pVnode, const char **dbname, int32_t *vgId) & metaGetTbNum(SMeta *pMeta) & metaGetNtbNum(SMeta *pMeta);
int64_t
(
*
getNumOfRowsInMem
)();
int64_t
(
*
getNumOfRowsInMem
)(
void
*
pVnode
);
/**
int32_t vnodeGetCtbIdList(void *pVnode, int64_t suid, SArray *list);
int32_t vnodeGetCtbIdListByFilter(void *pVnode, int64_t suid, SArray *list, bool (*filter)(void *arg), void *arg);
...
...
source/dnode/mnode/impl/src/mndQuery.c
浏览文件 @
4a42f6b9
...
...
@@ -33,6 +33,7 @@ void mndPostProcessQueryMsg(SRpcMsg *pMsg) {
int32_t
mndProcessQueryMsg
(
SRpcMsg
*
pMsg
)
{
int32_t
code
=
-
1
;
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
SReadHandle
handle
=
{.
mnd
=
pMnode
,
.
pMsgCb
=
&
pMnode
->
msgCb
};
mTrace
(
"msg:%p, in query queue is processing"
,
pMsg
);
...
...
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
4a42f6b9
...
...
@@ -277,6 +277,8 @@ static int32_t tdSetRSmaInfoItemParams(SSma *pSma, SRSmaParam *param, SRSmaStat
}
SReadHandle
handle
=
{
.
vnode
=
pVnode
,
.
initTqReader
=
1
,
.
pStateBackend
=
pStreamState
};
initStorageAPI
(
&
handle
.
api
);
pRSmaInfo
->
taskInfo
[
idx
]
=
qCreateStreamExecTaskInfo
(
param
->
qmsg
[
idx
],
&
handle
,
TD_VID
(
pVnode
));
if
(
!
pRSmaInfo
->
taskInfo
[
idx
])
{
terrno
=
TSDB_CODE_RSMA_QTASKINFO_CREATE
;
...
...
@@ -849,6 +851,8 @@ static int32_t tdCloneQTaskInfo(SSma *pSma, qTaskInfo_t dstTaskInfo, qTaskInfo_t
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
SReadHandle
handle
=
{
.
vnode
=
pVnode
,
.
initTqReader
=
1
};
initStorageAPI
(
&
handle
.
api
);
if
(
ASSERTS
(
!
dstTaskInfo
,
"dstTaskInfo:%p is not NULL"
,
dstTaskInfo
))
{
code
=
TSDB_CODE_APP_ERROR
;
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
4a42f6b9
...
...
@@ -671,6 +671,8 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
pHandle
->
pRef
=
pRef
;
SReadHandle
handle
=
{.
vnode
=
pVnode
,
.
initTableReader
=
true
,
.
initTqReader
=
true
,
.
version
=
ver
};
initStorageAPI
(
&
handle
.
api
);
pHandle
->
snapshotVer
=
ver
;
if
(
pHandle
->
execHandle
.
subType
==
TOPIC_SUB_TYPE__COLUMN
)
{
...
...
source/dnode/vnode/src/vnd/vnodeInitApi.c
浏览文件 @
4a42f6b9
...
...
@@ -65,6 +65,7 @@ void initMetadataAPI(SStoreMeta* pMeta) {
pMeta
->
getBasicInfo
=
vnodeGetInfo
;
pMeta
->
getNumOfChildTables
=
metaGetStbStats
;
// pMeta->getNumOfRowsInMem = tsdbGetNumOfRowsInMemTable;
pMeta
->
getChildTableList
=
vnodeGetCtbIdList
;
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
4a42f6b9
...
...
@@ -250,7 +250,9 @@ static int32_t vnodePreProcessDeleteMsg(SVnode *pVnode, SRpcMsg *pMsg) {
uint8_t
*
pCont
;
SEncoder
*
pCoder
=
&
(
SEncoder
){
0
};
SDeleteRes
res
=
{
0
};
SReadHandle
handle
=
{.
config
=
&
pVnode
->
config
,
.
vnode
=
pVnode
,
.
pMsgCb
=
&
pVnode
->
msgCb
};
initStorageAPI
(
&
handle
.
api
);
code
=
qWorkerProcessDeleteMsg
(
&
handle
,
pVnode
->
pQuery
,
pMsg
,
&
res
);
if
(
code
)
goto
_exit
;
...
...
source/libs/executor/src/sysscanoperator.c
浏览文件 @
4a42f6b9
...
...
@@ -1814,9 +1814,13 @@ void destroySysScanOperator(void* param) {
if
(
strncasecmp
(
name
,
TSDB_INS_TABLE_TABLES
,
TSDB_TABLE_FNAME_LEN
)
==
0
||
strncasecmp
(
name
,
TSDB_INS_TABLE_TAGS
,
TSDB_TABLE_FNAME_LEN
)
==
0
||
strncasecmp
(
name
,
TSDB_INS_TABLE_COLS
,
TSDB_TABLE_FNAME_LEN
)
==
0
||
pInfo
->
pCur
!=
NULL
)
{
pInfo
->
pAPI
->
metaFn
.
closeTableMetaCursor
(
pInfo
->
pCur
);
if
(
pInfo
->
pAPI
->
metaFn
.
closeTableMetaCursor
!=
NULL
)
{
pInfo
->
pAPI
->
metaFn
.
closeTableMetaCursor
(
pInfo
->
pCur
);
}
pInfo
->
pCur
=
NULL
;
}
if
(
pInfo
->
pIdx
)
{
taosArrayDestroy
(
pInfo
->
pIdx
->
uids
);
taosMemoryFree
(
pInfo
->
pIdx
);
...
...
@@ -2200,7 +2204,7 @@ static SSDataBlock* doBlockInfoScan(SOperatorInfo* pOperator) {
}
pAPI
->
tsdReader
.
tsdReaderGetDataBlockDistInfo
(
pBlockScanInfo
->
pHandle
,
&
blockDistInfo
);
blockDistInfo
.
numOfInmemRows
=
(
int32_t
)
pAPI
->
metaFn
.
getNumOfRowsInMem
(
pBlockScanInfo
->
pHandle
);
blockDistInfo
.
numOfInmemRows
=
(
int32_t
)
pAPI
->
tsdReader
.
tsdReaderGetNumOfInMemRows
(
pBlockScanInfo
->
pHandle
);
SSDataBlock
*
pBlock
=
pBlockScanInfo
->
pResBlock
;
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
4a42f6b9
...
...
@@ -2906,7 +2906,7 @@ void initDownStream(SOperatorInfo* downstream, SStreamAggSupporter* pAggSup, uin
}
int32_t
initStreamAggSupporter
(
SStreamAggSupporter
*
pSup
,
SqlFunctionCtx
*
pCtx
,
int32_t
numOfOutput
,
int64_t
gap
,
SStreamState
*
pState
,
int32_t
keySize
,
int16_t
keyType
)
{
SStreamState
*
pState
,
int32_t
keySize
,
int16_t
keyType
,
SStateStore
*
pStore
)
{
pSup
->
resultRowSize
=
keySize
+
getResultRowSize
(
pCtx
,
numOfOutput
);
pSup
->
pScanBlock
=
createSpecialDataBlock
(
STREAM_CLEAR
);
pSup
->
gap
=
gap
;
...
...
@@ -2939,6 +2939,8 @@ int32_t initStreamAggSupporter(SStreamAggSupporter* pSup, SqlFunctionCtx* pCtx,
qError
(
"Init stream agg supporter failed since %s, tempDir:%s"
,
terrstr
(),
tsTempDir
);
return
terrno
;
}
pSup
->
stateStore
=
*
pStore
;
int32_t
code
=
createDiskbasedBuf
(
&
pSup
->
pResultBuf
,
pageSize
,
bufSize
,
"function"
,
tsTempDir
);
for
(
int32_t
i
=
0
;
i
<
numOfOutput
;
++
i
)
{
pCtx
[
i
].
saveHandle
.
pBuf
=
pSup
->
pResultBuf
;
...
...
@@ -3600,7 +3602,7 @@ SOperatorInfo* createStreamSessionAggOperatorInfo(SOperatorInfo* downstream, SPh
}
code
=
initStreamAggSupporter
(
&
pInfo
->
streamAggSup
,
pSup
->
pCtx
,
numOfCols
,
pSessionNode
->
gap
,
pTaskInfo
->
streamInfo
.
pState
,
0
,
0
);
pTaskInfo
->
streamInfo
.
pState
,
0
,
0
,
&
pTaskInfo
->
storageAPI
.
stateStore
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
...
...
@@ -4149,7 +4151,7 @@ SOperatorInfo* createStreamStateAggOperatorInfo(SOperatorInfo* downstream, SPhys
int32_t
keySize
=
sizeof
(
SStateKeys
)
+
pColNode
->
node
.
resType
.
bytes
;
int16_t
type
=
pColNode
->
node
.
resType
.
type
;
code
=
initStreamAggSupporter
(
&
pInfo
->
streamAggSup
,
pSup
->
pCtx
,
numOfCols
,
0
,
pTaskInfo
->
streamInfo
.
pState
,
keySize
,
type
);
type
,
&
pTaskInfo
->
storageAPI
.
stateStore
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录