Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
76dd5a96
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看板
提交
76dd5a96
编写于
5月 09, 2023
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix crash caused by tsdbReaderResume error not handled
上级
5d483095
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
23 addition
and
6 deletion
+23
-6
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+23
-6
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
76dd5a96
...
@@ -4851,7 +4851,11 @@ int32_t tsdbNextDataBlock(STsdbReader* pReader, bool* hasNext) {
...
@@ -4851,7 +4851,11 @@ int32_t tsdbNextDataBlock(STsdbReader* pReader, bool* hasNext) {
qTrace
(
"tsdb/read: %p, take read mutex, code: %d"
,
pReader
,
code
);
qTrace
(
"tsdb/read: %p, take read mutex, code: %d"
,
pReader
,
code
);
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
tsdbReaderResume
(
pReader
);
code
=
tsdbReaderResume
(
pReader
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tsdbReleaseReader
(
pReader
);
return
code
;
}
}
}
if
(
pReader
->
innerReader
[
0
]
!=
NULL
&&
pReader
->
step
==
0
)
{
if
(
pReader
->
innerReader
[
0
]
!=
NULL
&&
pReader
->
step
==
0
)
{
...
@@ -5124,11 +5128,17 @@ SSDataBlock* tsdbRetrieveDataBlock(STsdbReader* pReader, SArray* pIdList) {
...
@@ -5124,11 +5128,17 @@ SSDataBlock* tsdbRetrieveDataBlock(STsdbReader* pReader, SArray* pIdList) {
}
}
int32_t
tsdbReaderReset
(
STsdbReader
*
pReader
,
SQueryTableDataCond
*
pCond
)
{
int32_t
tsdbReaderReset
(
STsdbReader
*
pReader
,
SQueryTableDataCond
*
pCond
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
qTrace
(
"tsdb/reader-reset: %p, take read mutex"
,
pReader
);
qTrace
(
"tsdb/reader-reset: %p, take read mutex"
,
pReader
);
tsdbAcquireReader
(
pReader
);
tsdbAcquireReader
(
pReader
);
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
tsdbReaderResume
(
pReader
);
code
=
tsdbReaderResume
(
pReader
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tsdbReleaseReader
(
pReader
);
return
code
;
}
}
}
if
(
isEmptyQueryTimeWindow
(
&
pReader
->
window
)
||
pReader
->
pReadSnap
==
NULL
)
{
if
(
isEmptyQueryTimeWindow
(
&
pReader
->
window
)
||
pReader
->
pReadSnap
==
NULL
)
{
...
@@ -5163,8 +5173,6 @@ int32_t tsdbReaderReset(STsdbReader* pReader, SQueryTableDataCond* pCond) {
...
@@ -5163,8 +5173,6 @@ int32_t tsdbReaderReset(STsdbReader* pReader, SQueryTableDataCond* pCond) {
int64_t
ts
=
asc
?
pReader
->
window
.
skey
-
1
:
pReader
->
window
.
ekey
+
1
;
int64_t
ts
=
asc
?
pReader
->
window
.
skey
-
1
:
pReader
->
window
.
ekey
+
1
;
resetAllDataBlockScanInfo
(
pStatus
->
pTableMap
,
ts
,
step
);
resetAllDataBlockScanInfo
(
pStatus
->
pTableMap
,
ts
,
step
);
int32_t
code
=
0
;
// no data in files, let's try buffer in memory
// no data in files, let's try buffer in memory
if
(
pStatus
->
fileIter
.
numOfFiles
==
0
)
{
if
(
pStatus
->
fileIter
.
numOfFiles
==
0
)
{
pStatus
->
loadFromFile
=
false
;
pStatus
->
loadFromFile
=
false
;
...
@@ -5209,7 +5217,11 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
...
@@ -5209,7 +5217,11 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
// find the start data block in file
// find the start data block in file
tsdbAcquireReader
(
pReader
);
tsdbAcquireReader
(
pReader
);
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
tsdbReaderResume
(
pReader
);
code
=
tsdbReaderResume
(
pReader
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tsdbReleaseReader
(
pReader
);
return
code
;
}
}
}
SReaderStatus
*
pStatus
=
&
pReader
->
status
;
SReaderStatus
*
pStatus
=
&
pReader
->
status
;
...
@@ -5277,12 +5289,17 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
...
@@ -5277,12 +5289,17 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
}
}
int64_t
tsdbGetNumOfRowsInMemTable
(
STsdbReader
*
pReader
)
{
int64_t
tsdbGetNumOfRowsInMemTable
(
STsdbReader
*
pReader
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
int64_t
rows
=
0
;
int64_t
rows
=
0
;
SReaderStatus
*
pStatus
=
&
pReader
->
status
;
SReaderStatus
*
pStatus
=
&
pReader
->
status
;
tsdbAcquireReader
(
pReader
);
tsdbAcquireReader
(
pReader
);
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
if
(
pReader
->
flag
==
READER_STATUS_SUSPEND
)
{
tsdbReaderResume
(
pReader
);
code
=
tsdbReaderResume
(
pReader
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tsdbReleaseReader
(
pReader
);
return
code
;
}
}
}
int32_t
iter
=
0
;
int32_t
iter
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录