Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fe8ccabf
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
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看板
提交
fe8ccabf
编写于
7月 14, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add lru to index
上级
a9e64f29
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
15 deletion
+10
-15
source/dnode/vnode/src/tsdb/.tsdbCache.c.swo
source/dnode/vnode/src/tsdb/.tsdbCache.c.swo
+0
-0
source/libs/index/src/index.c
source/libs/index/src/index.c
+1
-1
source/libs/index/src/indexFilter.c
source/libs/index/src/indexFilter.c
+6
-6
source/libs/index/src/indexFstFile.c
source/libs/index/src/indexFstFile.c
+1
-8
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+2
-0
未找到文件。
source/dnode/vnode/src/tsdb/.tsdbCache.c.swo
已删除
100644 → 0
浏览文件 @
a9e64f29
文件已删除
source/libs/index/src/index.c
浏览文件 @
fe8ccabf
...
@@ -113,7 +113,7 @@ int indexOpen(SIndexOpts* opts, const char* path, SIndex** index) {
...
@@ -113,7 +113,7 @@ int indexOpen(SIndexOpts* opts, const char* path, SIndex** index) {
ret
=
TSDB_CODE_OUT_OF_MEMORY
;
ret
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
END
;
goto
END
;
}
}
taosLRUCacheSetStrictCapacity
(
idx
->
lru
,
tru
e
);
taosLRUCacheSetStrictCapacity
(
idx
->
lru
,
fals
e
);
idx
->
tindex
=
idxTFileCreate
(
idx
,
path
);
idx
->
tindex
=
idxTFileCreate
(
idx
,
path
);
if
(
idx
->
tindex
==
NULL
)
{
if
(
idx
->
tindex
==
NULL
)
{
...
...
source/libs/index/src/indexFilter.c
浏览文件 @
fe8ccabf
...
@@ -31,7 +31,7 @@ typedef struct SIFParam {
...
@@ -31,7 +31,7 @@ typedef struct SIFParam {
SHashObj
*
pFilter
;
SHashObj
*
pFilter
;
SArray
*
result
;
SArray
*
result
;
char
*
condValue
;
char
*
condValue
;
SIdxFltStatus
status
;
SIdxFltStatus
status
;
uint8_t
colValType
;
uint8_t
colValType
;
...
@@ -45,7 +45,7 @@ typedef struct SIFParam {
...
@@ -45,7 +45,7 @@ typedef struct SIFParam {
typedef
struct
SIFCtx
{
typedef
struct
SIFCtx
{
int32_t
code
;
int32_t
code
;
SHashObj
*
pRes
;
/* element is SIFParam */
SHashObj
*
pRes
;
/* element is SIFParam */
bool
noExec
;
// true: just iterate condition tree, and add hint to executor plan
bool
noExec
;
// true: just iterate condition tree, and add hint to executor plan
SIndexMetaArg
arg
;
SIndexMetaArg
arg
;
// SIdxFltStatus st;
// SIdxFltStatus st;
...
@@ -137,7 +137,7 @@ static int32_t sifGetValueFromNode(SNode *node, char **value) {
...
@@ -137,7 +137,7 @@ static int32_t sifGetValueFromNode(SNode *node, char **value) {
// covert data From snode;
// covert data From snode;
SValueNode
*
vn
=
(
SValueNode
*
)
node
;
SValueNode
*
vn
=
(
SValueNode
*
)
node
;
char
*
pData
=
nodesGetValueFromNode
(
vn
);
char
*
pData
=
nodesGetValueFromNode
(
vn
);
SDataType
*
pType
=
&
vn
->
node
.
resType
;
SDataType
*
pType
=
&
vn
->
node
.
resType
;
int32_t
type
=
pType
->
type
;
int32_t
type
=
pType
->
type
;
int32_t
valLen
=
0
;
int32_t
valLen
=
0
;
...
@@ -175,7 +175,7 @@ static int32_t sifInitJsonParam(SNode *node, SIFParam *param, SIFCtx *ctx) {
...
@@ -175,7 +175,7 @@ static int32_t sifInitJsonParam(SNode *node, SIFParam *param, SIFCtx *ctx) {
SOperatorNode
*
nd
=
(
SOperatorNode
*
)
node
;
SOperatorNode
*
nd
=
(
SOperatorNode
*
)
node
;
assert
(
nodeType
(
node
)
==
QUERY_NODE_OPERATOR
);
assert
(
nodeType
(
node
)
==
QUERY_NODE_OPERATOR
);
SColumnNode
*
l
=
(
SColumnNode
*
)
nd
->
pLeft
;
SColumnNode
*
l
=
(
SColumnNode
*
)
nd
->
pLeft
;
SValueNode
*
r
=
(
SValueNode
*
)
nd
->
pRight
;
SValueNode
*
r
=
(
SValueNode
*
)
nd
->
pRight
;
param
->
colId
=
l
->
colId
;
param
->
colId
=
l
->
colId
;
param
->
colValType
=
l
->
node
.
resType
.
type
;
param
->
colValType
=
l
->
node
.
resType
.
type
;
...
@@ -357,7 +357,7 @@ static Filter sifGetFilterFunc(EIndexQueryType type, bool *reverse) {
...
@@ -357,7 +357,7 @@ static Filter sifGetFilterFunc(EIndexQueryType type, bool *reverse) {
static
int32_t
sifDoIndex
(
SIFParam
*
left
,
SIFParam
*
right
,
int8_t
operType
,
SIFParam
*
output
)
{
static
int32_t
sifDoIndex
(
SIFParam
*
left
,
SIFParam
*
right
,
int8_t
operType
,
SIFParam
*
output
)
{
int
ret
=
0
;
int
ret
=
0
;
SIndexMetaArg
*
arg
=
&
output
->
arg
;
SIndexMetaArg
*
arg
=
&
output
->
arg
;
EIndexQueryType
qtype
=
0
;
EIndexQueryType
qtype
=
0
;
SIF_ERR_RET
(
sifGetFuncFromSql
(
operType
,
&
qtype
));
SIF_ERR_RET
(
sifGetFuncFromSql
(
operType
,
&
qtype
));
if
(
left
->
colValType
==
TSDB_DATA_TYPE_JSON
)
{
if
(
left
->
colValType
==
TSDB_DATA_TYPE_JSON
)
{
...
@@ -749,7 +749,7 @@ int32_t doFilterTag(SNode *pFilterNode, SIndexMetaArg *metaArg, SArray *result,
...
@@ -749,7 +749,7 @@ int32_t doFilterTag(SNode *pFilterNode, SIndexMetaArg *metaArg, SArray *result,
SFilterInfo
*
filter
=
NULL
;
SFilterInfo
*
filter
=
NULL
;
SArray
*
output
=
taosArrayInit
(
8
,
sizeof
(
uint64_t
));
SArray
*
output
=
taosArrayInit
(
8
,
sizeof
(
uint64_t
));
SIFParam
param
=
{.
arg
=
*
metaArg
,
.
result
=
output
};
SIFParam
param
=
{.
arg
=
*
metaArg
,
.
result
=
output
};
SIF_ERR_RET
(
sifCalculate
((
SNode
*
)
pFilterNode
,
&
param
));
SIF_ERR_RET
(
sifCalculate
((
SNode
*
)
pFilterNode
,
&
param
));
...
...
source/libs/index/src/indexFstFile.c
浏览文件 @
fe8ccabf
...
@@ -106,12 +106,6 @@ static int idxFileCtxDoReadFrom(IFileCtx* ctx, uint8_t* buf, int len, int32_t of
...
@@ -106,12 +106,6 @@ static int idxFileCtxDoReadFrom(IFileCtx* ctx, uint8_t* buf, int len, int32_t of
blkLeft
=
kBlockSize
-
blkOffset
;
blkLeft
=
kBlockSize
-
blkOffset
;
}
while
(
len
>
0
);
}
while
(
len
>
0
);
#ifdef USE_MMAP
int32_t
last
=
ctx
->
file
.
size
-
offset
;
nRead
=
last
>=
len
?
len
:
last
;
memcpy
(
buf
,
ctx
->
file
.
ptr
+
offset
,
nRead
);
#endif
return
total
;
return
total
;
}
}
static
int
idxFileCtxGetSize
(
IFileCtx
*
ctx
)
{
static
int
idxFileCtxGetSize
(
IFileCtx
*
ctx
)
{
...
@@ -146,8 +140,6 @@ IFileCtx* idxFileCtxCreate(WriterType type, const char* path, bool readOnly, int
...
@@ -146,8 +140,6 @@ IFileCtx* idxFileCtxCreate(WriterType type, const char* path, bool readOnly, int
ctx
->
file
.
pFile
=
taosOpenFile
(
path
,
TD_FILE_CREATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
ctx
->
file
.
pFile
=
taosOpenFile
(
path
,
TD_FILE_CREATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
taosFtruncateFile
(
ctx
->
file
.
pFile
,
0
);
taosFtruncateFile
(
ctx
->
file
.
pFile
,
0
);
taosStatFile
(
path
,
&
ctx
->
file
.
size
,
NULL
);
taosStatFile
(
path
,
&
ctx
->
file
.
size
,
NULL
);
// ctx->file.size = (int)size;
}
else
{
}
else
{
ctx
->
file
.
pFile
=
taosOpenFile
(
path
,
TD_FILE_READ
);
ctx
->
file
.
pFile
=
taosOpenFile
(
path
,
TD_FILE_READ
);
...
@@ -166,6 +158,7 @@ IFileCtx* idxFileCtxCreate(WriterType type, const char* path, bool readOnly, int
...
@@ -166,6 +158,7 @@ IFileCtx* idxFileCtxCreate(WriterType type, const char* path, bool readOnly, int
ctx
->
mem
.
buf
=
taosMemoryCalloc
(
1
,
sizeof
(
char
)
*
capacity
);
ctx
->
mem
.
buf
=
taosMemoryCalloc
(
1
,
sizeof
(
char
)
*
capacity
);
ctx
->
mem
.
cap
=
capacity
;
ctx
->
mem
.
cap
=
capacity
;
}
}
ctx
->
write
=
idxFileCtxDoWrite
;
ctx
->
write
=
idxFileCtxDoWrite
;
ctx
->
read
=
idxFileCtxDoRead
;
ctx
->
read
=
idxFileCtxDoRead
;
ctx
->
flush
=
idxFileCtxDoFlush
;
ctx
->
flush
=
idxFileCtxDoFlush
;
...
...
source/libs/transport/src/transCli.c
浏览文件 @
fe8ccabf
...
@@ -753,6 +753,8 @@ static void cliHandleRelease(SCliMsg* pMsg, SCliThrd* pThrd) {
...
@@ -753,6 +753,8 @@ static void cliHandleRelease(SCliMsg* pMsg, SCliThrd* pThrd) {
SExHandle
*
exh
=
transAcquireExHandle
(
transGetRefMgt
(),
refId
);
SExHandle
*
exh
=
transAcquireExHandle
(
transGetRefMgt
(),
refId
);
if
(
exh
==
NULL
)
{
if
(
exh
==
NULL
)
{
tDebug
(
"%"
PRId64
" already release"
,
refId
);
tDebug
(
"%"
PRId64
" already release"
,
refId
);
destroyCmsg
(
pMsg
);
return
;
}
}
SCliConn
*
conn
=
exh
->
handle
;
SCliConn
*
conn
=
exh
->
handle
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录