Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fe097058
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fe097058
编写于
5月 24, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: set the init function pointer.
上级
a5661807
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
55 addition
and
48 deletion
+55
-48
include/libs/executor/storageapi.h
include/libs/executor/storageapi.h
+2
-0
include/libs/index/index.h
include/libs/index/index.h
+6
-12
source/dnode/qnode/CMakeLists.txt
source/dnode/qnode/CMakeLists.txt
+1
-0
source/dnode/snode/CMakeLists.txt
source/dnode/snode/CMakeLists.txt
+1
-0
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+0
-5
source/dnode/vnode/src/inc/meta.h
source/dnode/vnode/src/inc/meta.h
+6
-0
source/dnode/vnode/src/meta/metaQuery.c
source/dnode/vnode/src/meta/metaQuery.c
+8
-8
source/dnode/vnode/src/vnd/vnodeInitApi.c
source/dnode/vnode/src/vnd/vnodeInitApi.c
+10
-1
source/libs/executor/src/sysscanoperator.c
source/libs/executor/src/sysscanoperator.c
+14
-14
source/libs/index/src/indexFilter.c
source/libs/index/src/indexFilter.c
+3
-4
source/libs/qworker/CMakeLists.txt
source/libs/qworker/CMakeLists.txt
+2
-2
source/libs/scheduler/CMakeLists.txt
source/libs/scheduler/CMakeLists.txt
+1
-1
source/libs/stream/CMakeLists.txt
source/libs/stream/CMakeLists.txt
+1
-1
未找到文件。
include/libs/executor/storageapi.h
浏览文件 @
fe097058
...
...
@@ -21,6 +21,7 @@
#include "taosdef.h"
#include "tmsg.h"
#include "tcommon.h"
#include "index.h"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -544,6 +545,7 @@ typedef struct SStorageAPI {
SStoreSnapshotFn
snapshotFn
;
SStoreTqReader
tqReaderFn
;
SStateStore
stateStore
;
SMetaDataFilterAPI
metaFilter
;
}
SStorageAPI
;
#ifdef __cplusplus
...
...
include/libs/index/index.h
浏览文件 @
fe097058
...
...
@@ -239,7 +239,6 @@ void indexCleanup();
* @param results
* @return
*/
typedef
struct
SMetaFltParam
{
uint64_t
suid
;
int16_t
cid
;
...
...
@@ -250,17 +249,12 @@ typedef struct SMetaFltParam {
int
(
*
filterFunc
)(
void
*
a
,
void
*
b
,
int16_t
type
);
}
SMetaFltParam
;
typedef
struct
SStoreAPI
{
int32_t
(
*
metaFilterTableIds
)();
int32_t
(
*
metaFilterCreateTime
)();
int32_t
(
*
metaFilterTableName
)();
int32_t
(
*
metaFilterTtl
)();
}
SStoreAPI
;
//int32_t metaFilterTableIds(void *pMeta, SMetaFltParam *param, SArray *results);
//int32_t metaFilterCreateTime(void *pMeta, SMetaFltParam *parm, SArray *pUids);
//int32_t metaFilterTableName(void *pMeta, SMetaFltParam *param, SArray *pUids);
//int32_t metaFilterTtl(void *pMeta, SMetaFltParam *param, SArray *pUids);
typedef
struct
SMetaDataFilterAPI
{
int32_t
(
*
metaFilterTableIds
)(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
);
int32_t
(
*
metaFilterCreateTime
)(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
);
int32_t
(
*
metaFilterTableName
)(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
);
int32_t
(
*
metaFilterTtl
)(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
);
}
SMetaDataFilterAPI
;
#ifdef __cplusplus
}
...
...
source/dnode/qnode/CMakeLists.txt
浏览文件 @
fe097058
...
...
@@ -16,4 +16,5 @@ target_link_libraries(
PRIVATE executor
PRIVATE tdb
PRIVATE wal
PRIVATE index
)
\ No newline at end of file
source/dnode/snode/CMakeLists.txt
浏览文件 @
fe097058
...
...
@@ -15,4 +15,5 @@ target_link_libraries(
PRIVATE qcom
PRIVATE stream
PRIVATE wal
PRIVATE index
)
source/dnode/vnode/inc/vnode.h
浏览文件 @
fe097058
...
...
@@ -151,11 +151,6 @@ int32_t metaGetStbStats(void *pVnode, int64_t uid, int64_t *numOfTables);
//
//} SMetaFltParam;
// TODO, refactor later
//int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *results);
//int32_t metaFilterCreateTime(SMeta *pMeta, SMetaFltParam *parm, SArray *pUids);
//int32_t metaFilterTableName(SMeta *pMeta, SMetaFltParam *param, SArray *pUids);
//int32_t metaFilterTtl(SMeta *pMeta, SMetaFltParam *param, SArray *pUids);
#if 1 // refact APIs below (TODO)
typedef
SVCreateTbReq
STbCfg
;
...
...
source/dnode/vnode/src/inc/meta.h
浏览文件 @
fe097058
...
...
@@ -162,6 +162,12 @@ typedef struct {
int
metaCreateTagIdxKey
(
tb_uid_t
suid
,
int32_t
cid
,
const
void
*
pTagData
,
int32_t
nTagData
,
int8_t
type
,
tb_uid_t
uid
,
STagIdxKey
**
ppTagIdxKey
,
int32_t
*
nTagIdxKey
);
// TODO, refactor later
int32_t
metaFilterTableIds
(
void
*
pVnode
,
SMetaFltParam
*
param
,
SArray
*
results
);
int32_t
metaFilterCreateTime
(
void
*
pVnode
,
SMetaFltParam
*
parm
,
SArray
*
pUids
);
int32_t
metaFilterTableName
(
void
*
pVnode
,
SMetaFltParam
*
param
,
SArray
*
pUids
);
int32_t
metaFilterTtl
(
void
*
pVnode
,
SMetaFltParam
*
param
,
SArray
*
pUids
);
#ifndef META_REFACT
// SMetaDB
int
metaOpenDB
(
SMeta
*
pMeta
);
...
...
source/dnode/vnode/src/meta/metaQuery.c
浏览文件 @
fe097058
...
...
@@ -1012,8 +1012,8 @@ typedef struct {
int32_t
vLen
;
}
SIdxCursor
;
int32_t
metaFilterCreateTime
(
void
*
meta
,
void
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
m
eta
;
int32_t
metaFilterCreateTime
(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
((
SVnode
*
)
pVnode
)
->
pM
eta
;
SMetaFltParam
*
param
=
arg
;
int32_t
ret
=
0
;
...
...
@@ -1072,8 +1072,8 @@ END:
return
ret
;
}
int32_t
metaFilterTableName
(
void
*
meta
,
void
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
m
eta
;
int32_t
metaFilterTableName
(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
((
SVnode
*
)
pVnode
)
->
pM
eta
;
SMetaFltParam
*
param
=
arg
;
int32_t
ret
=
0
;
char
*
buf
=
NULL
;
...
...
@@ -1139,8 +1139,8 @@ END:
return
ret
;
}
int32_t
metaFilterTtl
(
void
*
meta
,
void
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
m
eta
;
int32_t
metaFilterTtl
(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
((
SVnode
*
)
pVnode
)
->
pM
eta
;
SMetaFltParam
*
param
=
arg
;
int32_t
ret
=
0
;
char
*
buf
=
NULL
;
...
...
@@ -1170,8 +1170,8 @@ END:
// impl later
return
0
;
}
int32_t
metaFilterTableIds
(
void
*
meta
,
void
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
m
eta
;
int32_t
metaFilterTableIds
(
void
*
pVnode
,
SMetaFltParam
*
arg
,
SArray
*
pUids
)
{
SMeta
*
pMeta
=
((
SVnode
*
)
pVnode
)
->
pM
eta
;
SMetaFltParam
*
param
=
arg
;
SMetaEntry
oStbEntry
=
{
0
};
...
...
source/dnode/vnode/src/vnd/vnodeInitApi.c
浏览文件 @
fe097058
...
...
@@ -16,12 +16,14 @@
#include "storageapi.h"
#include "vnodeInt.h"
#include "tstreamUpdate.h"
#include "meta.h"
static
void
initTsdbReaderAPI
(
TsdReader
*
pReader
);
static
void
initMetadataAPI
(
SStoreMeta
*
pMeta
);
static
void
initTqAPI
(
SStoreTqReader
*
pTq
);
static
void
initStateStoreAPI
(
SStateStore
*
pStore
);
static
void
initMetaReaderAPI
(
SStoreMetaReader
*
pMetaReader
);
static
void
initMetaFilterAPI
(
SMetaDataFilterAPI
*
pFilter
);
void
initStorageAPI
(
SStorageAPI
*
pAPI
)
{
initTsdbReaderAPI
(
&
pAPI
->
tsdReader
);
...
...
@@ -29,6 +31,7 @@ void initStorageAPI(SStorageAPI* pAPI) {
initTqAPI
(
&
pAPI
->
tqReaderFn
);
initStateStoreAPI
(
&
pAPI
->
stateStore
);
initMetaReaderAPI
(
&
pAPI
->
metaReaderFn
);
initMetaFilterAPI
(
&
pAPI
->
metaFilter
);
}
void
initTsdbReaderAPI
(
TsdReader
*
pReader
)
{
...
...
@@ -69,7 +72,6 @@ void initMetadataAPI(SStoreMeta* pMeta) {
pMeta
->
getInvertIndex
=
vnodeGetIvtIdx
;
pMeta
->
extractTagVal
=
(
const
void
*
(
*
)(
const
void
*
,
int16_t
,
STagVal
*
))
metaGetTableTagVal
;
}
void
initTqAPI
(
SStoreTqReader
*
pTq
)
{
...
...
@@ -188,4 +190,11 @@ void initMetaReaderAPI(SStoreMetaReader* pMetaReader) {
pMetaReader
->
getTableEntryByName
=
metaGetTableEntryByName
;
pMetaReader
->
readerReleaseLock
=
metaReaderReleaseLock
;
}
void
initMetaFilterAPI
(
SMetaDataFilterAPI
*
pFilter
)
{
pFilter
->
metaFilterCreateTime
=
metaFilterCreateTime
;
pFilter
->
metaFilterTableIds
=
metaFilterTableIds
;
pFilter
->
metaFilterTableName
=
metaFilterTableName
;
pFilter
->
metaFilterTtl
=
metaFilterTtl
;
}
\ No newline at end of file
source/libs/executor/src/sysscanoperator.c
浏览文件 @
fe097058
...
...
@@ -39,8 +39,9 @@ typedef int32_t (*__sys_filte)(void* pMeta, SNode* cond, SArray* result);
typedef
int32_t
(
*
__sys_check
)(
SNode
*
cond
);
typedef
struct
SSTabFltArg
{
void
*
pMeta
;
void
*
pVnode
;
void
*
pMeta
;
void
*
pVnode
;
SStorageAPI
*
pAPI
;
}
SSTabFltArg
;
typedef
struct
SSysTableIndex
{
...
...
@@ -153,11 +154,11 @@ static void relocateAndFilterSysTagsScanResult(SSysTableScanInfo* pInfo, int32_t
SFilterInfo
*
pFilterInfo
);
int32_t
sysFilte__DbName
(
void
*
arg
,
SNode
*
pNode
,
SArray
*
result
)
{
void
*
pVnode
=
((
SSTabFltArg
*
)
arg
)
->
pVnode
;
SSTabFltArg
*
pArg
=
arg
;
void
*
pVnode
=
pArg
->
pVnode
;
const
char
*
db
=
NULL
;
ASSERT
(
0
);
// pAPI->metaFn.getBasicInfo(pVnode, &db, NULL);
pArg
->
pAPI
->
metaFn
.
getBasicInfo
(
pVnode
,
&
db
,
NULL
,
NULL
,
NULL
);
SName
sn
=
{
0
};
char
dbname
[
TSDB_DB_FNAME_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
...
...
@@ -181,11 +182,11 @@ int32_t sysFilte__DbName(void* arg, SNode* pNode, SArray* result) {
}
int32_t
sysFilte__VgroupId
(
void
*
arg
,
SNode
*
pNode
,
SArray
*
result
)
{
void
*
pVnode
=
((
SSTabFltArg
*
)
arg
)
->
pVnode
;
SSTabFltArg
*
pArg
=
arg
;
void
*
pVnode
=
((
SSTabFltArg
*
)
arg
)
->
pVnode
;
int64_t
vgId
=
0
;
ASSERT
(
0
);
// pAPI->metaFn.getBasicInfo(pVnode, NULL, (int32_t*)&vgId);
pArg
->
pAPI
->
metaFn
.
getBasicInfo
(
pVnode
,
NULL
,
(
int32_t
*
)
&
vgId
,
NULL
,
NULL
);
SOperatorNode
*
pOper
=
(
SOperatorNode
*
)
pNode
;
SValueNode
*
pVal
=
(
SValueNode
*
)
pOper
->
pRight
;
...
...
@@ -202,7 +203,7 @@ int32_t sysFilte__VgroupId(void* arg, SNode* pNode, SArray* result) {
}
int32_t
sysFilte__TableName
(
void
*
arg
,
SNode
*
pNode
,
SArray
*
result
)
{
void
*
pMeta
=
((
SSTabFltArg
*
)
arg
)
->
pMeta
;
SSTabFltArg
*
pArg
=
arg
;
SOperatorNode
*
pOper
=
(
SOperatorNode
*
)
pNode
;
SValueNode
*
pVal
=
(
SValueNode
*
)
pOper
->
pRight
;
...
...
@@ -222,7 +223,8 @@ int32_t sysFilte__TableName(void* arg, SNode* pNode, SArray* result) {
}
int32_t
sysFilte__CreateTime
(
void
*
arg
,
SNode
*
pNode
,
SArray
*
result
)
{
void
*
pMeta
=
((
SSTabFltArg
*
)
arg
)
->
pMeta
;
SSTabFltArg
*
pArg
=
arg
;
SStorageAPI
*
pAPI
=
pArg
->
pAPI
;
SOperatorNode
*
pOper
=
(
SOperatorNode
*
)
pNode
;
SValueNode
*
pVal
=
(
SValueNode
*
)
pOper
->
pRight
;
...
...
@@ -239,10 +241,8 @@ int32_t sysFilte__CreateTime(void* arg, SNode* pNode, SArray* result) {
.
equal
=
equal
,
.
filterFunc
=
func
};
ASSERT
(
0
);
return
0
;
// int32_t ret = metaFilterCreateTime(pMeta, ¶m, result);
// return ret;
int32_t
ret
=
pAPI
->
metaFilter
.
metaFilterCreateTime
(
pArg
->
pVnode
,
&
param
,
result
);
return
ret
;
}
int32_t
sysFilte__Ncolumn
(
void
*
arg
,
SNode
*
pNode
,
SArray
*
result
)
{
...
...
source/libs/index/src/indexFilter.c
浏览文件 @
fe097058
...
...
@@ -67,9 +67,8 @@ typedef union {
typedef
struct
SIFParam
{
SHashObj
*
pFilter
;
SArray
*
result
;
char
*
condValue
;
SArray
*
result
;
char
*
condValue
;
SIdxFltStatus
status
;
uint8_t
colValType
;
...
...
@@ -79,7 +78,7 @@ typedef struct SIFParam {
char
colName
[
TSDB_COL_NAME_LEN
*
2
+
4
];
SIndexMetaArg
arg
;
S
StoreAPI
api
;
S
MetaDataFilterAPI
api
;
}
SIFParam
;
typedef
struct
SIFCtx
{
...
...
source/libs/qworker/CMakeLists.txt
浏览文件 @
fe097058
...
...
@@ -9,11 +9,11 @@ target_include_directories(
IF
(
TD_GRANT
)
TARGET_LINK_LIBRARIES
(
qworker
PRIVATE os util transport nodes planner qcom executor grant
PRIVATE os util transport nodes planner qcom executor
index
grant
)
ELSE
()
TARGET_LINK_LIBRARIES
(
qworker
PRIVATE os util transport nodes planner qcom executor
PRIVATE os util transport nodes planner qcom executor
index
)
ENDIF
()
...
...
source/libs/scheduler/CMakeLists.txt
浏览文件 @
fe097058
...
...
@@ -9,7 +9,7 @@ target_include_directories(
target_link_libraries
(
scheduler
PUBLIC os util nodes planner qcom common catalog transport command qworker executor
PUBLIC os util nodes planner qcom common catalog transport command qworker executor
index
)
if
(
${
BUILD_TEST
}
)
...
...
source/libs/stream/CMakeLists.txt
浏览文件 @
fe097058
...
...
@@ -10,7 +10,7 @@ if(${BUILD_WITH_ROCKSDB})
target_link_libraries
(
stream
PUBLIC rocksdb tdb
PRIVATE os util transport qcom executor wal
PRIVATE os util transport qcom executor wal
index
)
target_include_directories
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录