Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cbae8b5c
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看板
提交
cbae8b5c
编写于
1月 17, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix reference bug
上级
4e47ad05
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
13 deletion
+17
-13
src/system/detail/src/vnodeQueryImpl.c
src/system/detail/src/vnodeQueryImpl.c
+17
-13
未找到文件。
src/system/detail/src/vnodeQueryImpl.c
浏览文件 @
cbae8b5c
...
...
@@ -1145,15 +1145,17 @@ SCacheBlock *getCacheDataBlock(SMeterObj *pMeterObj, SQueryRuntimeEnv* pRuntimeE
// keep the structure as well as the block data into local buffer
memcpy
(
&
pRuntimeEnv
->
cacheBlock
,
pBlock
,
sizeof
(
SCacheBlock
));
SCacheBlock
*
pNewBlock
=
&
pRuntimeEnv
->
cacheBlock
;
// the commit data points will be ignored
int32_t
offset
=
0
;
int32_t
numOfPoints
=
pBlock
->
numOfPoints
;
int32_t
numOfPoints
=
p
New
Block
->
numOfPoints
;
if
(
pQuery
->
firstSlot
==
pQuery
->
commitSlot
)
{
assert
(
pQuery
->
commitPoint
>=
0
&&
pQuery
->
commitPoint
<=
pBlock
->
numOfPoints
);
assert
(
pQuery
->
commitPoint
>=
0
&&
pQuery
->
commitPoint
<=
p
New
Block
->
numOfPoints
);
offset
=
pQuery
->
commitPoint
;
numOfPoints
=
pBlock
->
numOfPoints
-
offset
;
numOfPoints
=
p
New
Block
->
numOfPoints
-
offset
;
if
(
offset
!=
0
)
{
dTrace
(
"%p ignore the data in cache block that are commit already, numOfblock:%d slot:%d ignore points:%d. "
...
...
@@ -1161,10 +1163,10 @@ SCacheBlock *getCacheDataBlock(SMeterObj *pMeterObj, SQueryRuntimeEnv* pRuntimeE
pQuery
->
firstSlot
,
pQuery
->
currentSlot
);
}
pBlock
->
numOfPoints
=
numOfPoints
;
p
New
Block
->
numOfPoints
=
numOfPoints
;
// current block are all commit already, ignore it
if
(
pBlock
->
numOfPoints
==
0
)
{
if
(
p
New
Block
->
numOfPoints
==
0
)
{
dTrace
(
"%p ignore current in cache block that are all commit already, numOfblock:%d slot:%d"
"first:%d last:%d"
,
GET_QINFO_ADDR
(
pQuery
),
pQuery
->
numOfBlocks
,
pQuery
->
slot
,
pQuery
->
firstSlot
,
pQuery
->
currentSlot
);
...
...
@@ -1195,16 +1197,18 @@ SCacheBlock *getCacheDataBlock(SMeterObj *pMeterObj, SQueryRuntimeEnv* pRuntimeE
setNullN
(
dst
,
type
,
bytes
,
numOfPoints
);
}
}
assert
(
numOfPoints
==
pNewBlock
->
numOfPoints
);
// if the primary timestamp are not loaded by default, always load it here into buffer
if
(
!
PRIMARY_TSCOL_LOADED
(
pQuery
))
{
memcpy
(
pRuntimeEnv
->
primaryColBuffer
->
data
,
pBlock
->
offset
[
0
]
,
TSDB_KEYSIZE
*
pBlock
->
numOfPoints
);
memcpy
(
pRuntimeEnv
->
primaryColBuffer
->
data
,
pBlock
->
offset
[
0
]
+
offset
*
TSDB_KEYSIZE
,
TSDB_KEYSIZE
*
numOfPoints
);
}
pQuery
->
fileId
=
-
1
;
pQuery
->
slot
=
slot
;
if
(
!
isCacheBlockValid
(
pQuery
,
pBlock
,
pMeterObj
))
{
if
(
!
isCacheBlockValid
(
pQuery
,
p
New
Block
,
pMeterObj
))
{
return
NULL
;
}
...
...
@@ -1214,14 +1218,14 @@ SCacheBlock *getCacheDataBlock(SMeterObj *pMeterObj, SQueryRuntimeEnv* pRuntimeE
*/
vnodeSetDataBlockInfoLoaded
(
pRuntimeEnv
,
pMeterObj
,
-
1
,
true
);
TSKEY
skey
=
getTimestampInCacheBlock
(
pRuntimeEnv
,
pBlock
,
0
);
TSKEY
ekey
=
getTimestampInCacheBlock
(
pRuntimeEnv
,
p
Block
,
pBlock
->
numOfPoints
-
1
);
TSKEY
skey
=
getTimestampInCacheBlock
(
pRuntimeEnv
,
p
New
Block
,
0
);
TSKEY
ekey
=
getTimestampInCacheBlock
(
pRuntimeEnv
,
p
NewBlock
,
numOfPoints
-
1
);
dTrace
(
"QInfo:%p vid:%d sid:%d id:%s, fileId:%d, load cache block, ts:%d, slot:%d, brange:%lld-%lld, rows:%d"
,
GET_QINFO_ADDR
(
pQuery
),
pMeterObj
->
vnode
,
pMeterObj
->
sid
,
pMeterObj
->
meterId
,
pQuery
->
fileId
,
1
,
pQuery
->
slot
,
skey
,
ekey
,
pBlock
->
numOfPoints
);
pQuery
->
slot
,
skey
,
ekey
,
numOfPoints
);
return
&
pRuntimeEnv
->
cache
Block
;
return
pNew
Block
;
}
static
SCompBlock
*
getDiskDataBlock
(
SQuery
*
pQuery
,
int32_t
slot
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录