Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
395926f7
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
未验证
提交
395926f7
编写于
3月 23, 2020
作者:
P
plum-lihui
提交者:
GitHub
3月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1408 from taosdata/hotfix_liaohj
hotfix a query crash.
上级
968482e9
10024fa6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
4 deletion
+16
-4
src/system/detail/inc/vnodeQueryImpl.h
src/system/detail/inc/vnodeQueryImpl.h
+1
-1
src/system/detail/src/vnodeQueryImpl.c
src/system/detail/src/vnodeQueryImpl.c
+4
-2
src/system/detail/src/vnodeQueryProcess.c
src/system/detail/src/vnodeQueryProcess.c
+11
-1
未找到文件。
src/system/detail/inc/vnodeQueryImpl.h
浏览文件 @
395926f7
...
@@ -186,7 +186,7 @@ int32_t vnodeGetVnodeHeaderFileIdx(int32_t* fid, SQueryRuntimeEnv* pRuntimeEnv,
...
@@ -186,7 +186,7 @@ int32_t vnodeGetVnodeHeaderFileIdx(int32_t* fid, SQueryRuntimeEnv* pRuntimeEnv,
int32_t
createDataBlocksInfoEx
(
SMeterDataInfo
**
pMeterDataInfo
,
int32_t
numOfMeters
,
int32_t
createDataBlocksInfoEx
(
SMeterDataInfo
**
pMeterDataInfo
,
int32_t
numOfMeters
,
SMeterDataBlockInfoEx
**
pDataBlockInfoEx
,
int32_t
numOfCompBlocks
,
SMeterDataBlockInfoEx
**
pDataBlockInfoEx
,
int32_t
numOfCompBlocks
,
int32_t
*
nAllocBlocksInfoSize
,
int64_t
addr
);
int32_t
*
nAllocBlocksInfoSize
,
int
32_t
*
realBlocks
,
int
64_t
addr
);
void
freeMeterBlockInfoEx
(
SMeterDataBlockInfoEx
*
pDataBlockInfoEx
,
int32_t
len
);
void
freeMeterBlockInfoEx
(
SMeterDataBlockInfoEx
*
pDataBlockInfoEx
,
int32_t
len
);
void
setExecutionContext
(
SMeterQuerySupportObj
*
pSupporter
,
SOutputRes
*
outputRes
,
int32_t
meterIdx
,
int32_t
groupIdx
,
void
setExecutionContext
(
SMeterQuerySupportObj
*
pSupporter
,
SOutputRes
*
outputRes
,
int32_t
meterIdx
,
int32_t
groupIdx
,
...
...
src/system/detail/src/vnodeQueryImpl.c
浏览文件 @
395926f7
...
@@ -6111,7 +6111,7 @@ void cleanBlockOrderSupporter(SBlockOrderSupporter* pSupporter, int32_t numOfTab
...
@@ -6111,7 +6111,7 @@ void cleanBlockOrderSupporter(SBlockOrderSupporter* pSupporter, int32_t numOfTab
int32_t
createDataBlocksInfoEx
(
SMeterDataInfo
**
pMeterDataInfo
,
int32_t
numOfMeters
,
int32_t
createDataBlocksInfoEx
(
SMeterDataInfo
**
pMeterDataInfo
,
int32_t
numOfMeters
,
SMeterDataBlockInfoEx
**
pDataBlockInfoEx
,
int32_t
numOfCompBlocks
,
SMeterDataBlockInfoEx
**
pDataBlockInfoEx
,
int32_t
numOfCompBlocks
,
int32_t
*
nAllocBlocksInfoSize
,
int64_t
addr
)
{
int32_t
*
nAllocBlocksInfoSize
,
int
32_t
*
realBlocks
,
int
64_t
addr
)
{
// release allocated memory first
// release allocated memory first
freeDataBlockFieldInfo
(
*
pDataBlockInfoEx
,
*
nAllocBlocksInfoSize
);
freeDataBlockFieldInfo
(
*
pDataBlockInfoEx
,
*
nAllocBlocksInfoSize
);
...
@@ -6174,7 +6174,9 @@ int32_t createDataBlocksInfoEx(SMeterDataInfo **pMeterDataInfo, int32_t numOfMet
...
@@ -6174,7 +6174,9 @@ int32_t createDataBlocksInfoEx(SMeterDataInfo **pMeterDataInfo, int32_t numOfMet
dTrace
(
"QInfo %p create data blocks info struct completed"
,
addr
);
dTrace
(
"QInfo %p create data blocks info struct completed"
,
addr
);
assert
(
cnt
==
numOfCompBlocks
&&
numOfQualMeters
<=
numOfMeters
);
// the pMeterDataInfo[j]->numOfBlocks may be 0
assert
(
cnt
<=
numOfCompBlocks
&&
numOfQualMeters
<=
numOfMeters
);
// the pMeterDataInfo[j]->numOfBlocks may be 0
*
realBlocks
=
cnt
;
supporter
.
numOfMeters
=
numOfQualMeters
;
supporter
.
numOfMeters
=
numOfQualMeters
;
SLoserTreeInfo
*
pTree
=
NULL
;
SLoserTreeInfo
*
pTree
=
NULL
;
...
...
src/system/detail/src/vnodeQueryProcess.c
浏览文件 @
395926f7
...
@@ -345,8 +345,9 @@ static void queryOnMultiDataFiles(SQInfo *pQInfo, SMeterDataInfo *pMeterDataInfo
...
@@ -345,8 +345,9 @@ static void queryOnMultiDataFiles(SQInfo *pQInfo, SMeterDataInfo *pMeterDataInfo
continue
;
continue
;
}
}
int32_t
realBlocks
=
0
;
ret
=
createDataBlocksInfoEx
(
pReqMeterDataInfo
,
numOfQualifiedMeters
,
&
pDataBlockInfoEx
,
numOfBlocks
,
ret
=
createDataBlocksInfoEx
(
pReqMeterDataInfo
,
numOfQualifiedMeters
,
&
pDataBlockInfoEx
,
numOfBlocks
,
&
nAllocBlocksInfoSize
,
(
int64_t
)
pQInfo
);
&
nAllocBlocksInfoSize
,
&
realBlocks
,
(
int64_t
)
pQInfo
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
// failed to create data blocks
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
// failed to create data blocks
dError
(
"QInfo:%p build blockInfoEx failed, abort"
,
pQInfo
);
dError
(
"QInfo:%p build blockInfoEx failed, abort"
,
pQInfo
);
tfree
(
pReqMeterDataInfo
);
tfree
(
pReqMeterDataInfo
);
...
@@ -356,6 +357,15 @@ static void queryOnMultiDataFiles(SQInfo *pQInfo, SMeterDataInfo *pMeterDataInfo
...
@@ -356,6 +357,15 @@ static void queryOnMultiDataFiles(SQInfo *pQInfo, SMeterDataInfo *pMeterDataInfo
return
;
return
;
}
}
assert
(
realBlocks
<=
numOfBlocks
);
numOfBlocks
=
realBlocks
;
if
(
numOfBlocks
==
0
)
{
fid
+=
step
;
tfree
(
pReqMeterDataInfo
);
continue
;
}
dTrace
(
"QInfo:%p start to load %d blocks and check"
,
pQInfo
,
numOfBlocks
);
dTrace
(
"QInfo:%p start to load %d blocks and check"
,
pQInfo
,
numOfBlocks
);
int64_t
TRACE_OUTPUT_BLOCK_CNT
=
10000
;
int64_t
TRACE_OUTPUT_BLOCK_CNT
=
10000
;
int64_t
stimeUnit
=
0
;
int64_t
stimeUnit
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录