Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
622e1cb6
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看板
提交
622e1cb6
编写于
6月 29, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix coverity issue.
上级
225b422f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
62 deletion
+12
-62
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-55
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+0
-1
source/libs/executor/src/joinoperator.c
source/libs/executor/src/joinoperator.c
+6
-3
source/libs/stream/src/streamData.c
source/libs/stream/src/streamData.c
+1
-0
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+2
-1
未找到文件。
source/dnode/vnode/src/tq/tq.c
浏览文件 @
622e1cb6
...
...
@@ -1157,7 +1157,7 @@ int32_t extractDelDataBlock(const void* pData, int32_t len, int64_t ver, SStream
SDecoder
*
pCoder
=
&
(
SDecoder
){
0
};
SDeleteRes
*
pRes
=
&
(
SDeleteRes
){
0
};
*
pRefBlock
=
NULL
;
(
*
pRefBlock
)
=
NULL
;
pRes
->
uidList
=
taosArrayInit
(
0
,
sizeof
(
tb_uid_t
));
if
(
pRes
->
uidList
==
NULL
)
{
...
...
@@ -1197,7 +1197,7 @@ int32_t extractDelDataBlock(const void* pData, int32_t len, int64_t ver, SStream
taosArrayDestroy
(
pRes
->
uidList
);
*
pRefBlock
=
taosAllocateQitem
(
sizeof
(
SStreamRefDataBlock
),
DEF_QITEM
,
0
);
if
(
pRefBlock
==
NULL
)
{
if
(
(
*
pRefBlock
)
==
NULL
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
622e1cb6
...
...
@@ -3064,6 +3064,7 @@ static int32_t moveToNextFile(STsdbReader* pReader, SBlockNumber* pBlockNum, SAr
// only check here, since the iterate data in memory is very fast.
if
(
pReader
->
code
!=
TSDB_CODE_SUCCESS
)
{
tsdbWarn
(
"tsdb reader is stopped ASAP, code:%s, %s"
,
strerror
(
pReader
->
code
),
pReader
->
idStr
);
taosArrayDestroy
(
pIndexList
);
return
pReader
->
code
;
}
...
...
@@ -5583,58 +5584,3 @@ void tsdbReaderSetId(STsdbReader* pReader, const char* idstr) {
}
void
tsdbReaderSetCloseFlag
(
STsdbReader
*
pReader
)
{
pReader
->
code
=
TSDB_CODE_TSC_QUERY_CANCELLED
;
}
/*-------------todo:refactor the implementation of those APIs in this file to seperate the API into two files------*/
// opt perf, do NOT create so many readers
int64_t
tsdbGetLastTimestamp
(
SVnode
*
pVnode
,
void
*
pTableList
,
int32_t
numOfTables
,
const
char
*
pIdStr
)
{
SQueryTableDataCond
cond
=
{.
type
=
TIMEWINDOW_RANGE_CONTAINED
,
.
numOfCols
=
1
,
.
order
=
TSDB_ORDER_DESC
,
.
startVersion
=
-
1
,
.
endVersion
=
-
1
};
cond
.
twindows
.
skey
=
INT64_MIN
;
cond
.
twindows
.
ekey
=
INT64_MAX
;
cond
.
colList
=
taosMemoryCalloc
(
1
,
sizeof
(
SColumnInfo
));
cond
.
pSlotList
=
taosMemoryMalloc
(
sizeof
(
int32_t
)
*
cond
.
numOfCols
);
if
(
cond
.
colList
==
NULL
||
cond
.
pSlotList
==
NULL
)
{
// todo
}
cond
.
colList
[
0
].
colId
=
1
;
cond
.
colList
[
0
].
slotId
=
0
;
cond
.
colList
[
0
].
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
cond
.
pSlotList
[
0
]
=
0
;
STableKeyInfo
*
pTableKeyInfo
=
pTableList
;
STsdbReader
*
pReader
=
NULL
;
SSDataBlock
*
pBlock
=
createDataBlock
();
SColumnInfoData
data
=
{
0
};
data
.
info
=
(
SColumnInfo
)
{.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
colId
=
1
,
.
bytes
=
TSDB_KEYSIZE
};
blockDataAppendColInfo
(
pBlock
,
&
data
);
int64_t
key
=
INT64_MIN
;
for
(
int32_t
i
=
0
;
i
<
numOfTables
;
++
i
)
{
int32_t
code
=
tsdbReaderOpen
(
pVnode
,
&
cond
,
&
pTableKeyInfo
[
i
],
1
,
pBlock
,
(
void
**
)
&
pReader
,
pIdStr
,
false
,
NULL
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
bool
hasData
=
false
;
code
=
tsdbNextDataBlock
(
pReader
,
&
hasData
);
if
(
!
hasData
||
code
!=
TSDB_CODE_SUCCESS
)
{
continue
;
}
SColumnInfoData
*
pCol
=
taosArrayGet
(
pBlock
->
pDataBlock
,
0
);
int64_t
k
=
*
(
int64_t
*
)
pCol
->
pData
;
if
(
key
<
k
)
{
key
=
k
;
}
tsdbReaderClose
(
pReader
);
}
return
0
;
}
source/libs/executor/src/executil.c
浏览文件 @
622e1cb6
...
...
@@ -1109,7 +1109,6 @@ int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTagCond, S
code
=
doFilterTag
(
pTagIndexCond
,
&
metaArg
,
pUidList
,
&
status
,
&
pStorageAPI
->
metaFilter
);
if
(
code
!=
0
||
status
==
SFLT_NOT_INDEX
)
{
// temporarily disable it for performance sake
qDebug
(
"failed to get tableIds from index, suid:%"
PRIu64
,
pScanNode
->
uid
);
code
=
TSDB_CODE_SUCCESS
;
}
else
{
qInfo
(
"succ to get filter result, table num: %d"
,
(
int
)
taosArrayGetSize
(
pUidList
));
}
...
...
source/libs/executor/src/joinoperator.c
浏览文件 @
622e1cb6
...
...
@@ -150,9 +150,12 @@ static int32_t initTagColskeyBuf(int32_t* keyLen, char** keyBuf, const SArray* p
int32_t
nullFlagSize
=
sizeof
(
int8_t
)
*
numOfGroupCols
;
(
*
keyLen
)
+=
nullFlagSize
;
(
*
keyBuf
)
=
taosMemoryCalloc
(
1
,
(
*
keyLen
));
if
((
*
keyBuf
)
==
NULL
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
if
(
*
keyLen
>=
0
)
{
(
*
keyBuf
)
=
taosMemoryCalloc
(
1
,
(
*
keyLen
));
if
((
*
keyBuf
)
==
NULL
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
}
}
return
TSDB_CODE_SUCCESS
;
...
...
source/libs/stream/src/streamData.c
浏览文件 @
622e1cb6
...
...
@@ -27,6 +27,7 @@ SStreamDataBlock* createStreamDataFromDispatchMsg(const SStreamDispatchReq* pReq
int32_t
blockNum
=
pReq
->
blockNum
;
SArray
*
pArray
=
taosArrayInit_s
(
sizeof
(
SSDataBlock
),
blockNum
);
if
(
pArray
==
NULL
)
{
taosFreeQitem
(
pData
);
return
NULL
;
}
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
622e1cb6
...
...
@@ -212,8 +212,9 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) {
}
if
(
taosArrayGetSize
(
pRes
)
==
0
)
{
taosArrayDestroy
(
pRes
);
if
(
finished
)
{
taosArrayDestroy
(
pRes
);
qDebug
(
"s-task:%s finish recover exec task "
,
pTask
->
id
.
idStr
);
break
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录