Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7b7a483a
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7b7a483a
编写于
4月 25, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): add tmp variable to hold the TSDBROW value.
上级
16fe48f7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
15 deletion
+16
-15
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+1
-5
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+15
-10
未找到文件。
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
7b7a483a
...
...
@@ -124,11 +124,7 @@ static void mndCalMqRebalance(SMnode *pMnode) {
int32_t
contLen
=
0
;
void
*
pReq
=
mndBuildTimerMsg
(
&
contLen
);
if
(
pReq
!=
NULL
)
{
SRpcMsg
rpcMsg
=
{
.
msgType
=
TDMT_MND_TMQ_TIMER
,
.
pCont
=
pReq
,
.
contLen
=
contLen
,
};
SRpcMsg
rpcMsg
=
{
.
msgType
=
TDMT_MND_TMQ_TIMER
,
.
pCont
=
pReq
,
.
contLen
=
contLen
};
tmsgPutToQueue
(
&
pMnode
->
msgCb
,
READ_QUEUE
,
&
rpcMsg
);
}
}
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
7b7a483a
...
...
@@ -1876,10 +1876,10 @@ static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBloc
TSDBROW
*
pRow
=
tMergeTreeGetRow
(
&
pLastBlockReader
->
mergeTree
);
int64_t
key
=
pRow
->
pBlockData
->
aTSKEY
[
pRow
->
iRow
];
int64_t
ver
=
pRow
->
version
;
int64_t
ver
=
pRow
->
pBlockData
->
aVersion
[
pRow
->
iRow
]
;
pLastBlockReader
->
currentKey
=
key
;
pScanInfo
->
lastKeyInStt
=
ver
;
pScanInfo
->
lastKeyInStt
=
key
;
if
(
!
hasBeenDropped
(
pScanInfo
->
delSkyline
,
&
pScanInfo
->
lastBlockDelIndex
,
key
,
ver
,
pLastBlockReader
->
order
,
pVerRange
))
{
// the qualifed ts may equal to k.ts, only a greater version one.
...
...
@@ -2132,16 +2132,21 @@ static int32_t doMergeFileBlockAndLastBlock(SLastBlockReader* pLastBlockReader,
bool
mergeBlockData
)
{
SRowMerger
*
pMerger
=
&
pReader
->
status
.
merger
;
SFileBlockDumpInfo
*
pDumpInfo
=
&
pReader
->
status
.
fBlockDumpInfo
;
int64_t
tsLastBlock
=
getCurrentKeyInLastBlock
(
pLastBlockReader
);
bool
copied
=
false
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
SRow
*
pTSRow
=
NULL
;
TSDBROW
*
pRow
=
tMergeTreeGetRow
(
&
pLastBlockReader
->
mergeTree
);
int64_t
tsLastBlock
=
getCurrentKeyInLastBlock
(
pLastBlockReader
);
bool
copied
=
false
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
SRow
*
pTSRow
=
NULL
;
TSDBROW
*
pRow
=
tMergeTreeGetRow
(
&
pLastBlockReader
->
mergeTree
);
// create local variable to hold the row value
TSDBROW
fRow
=
{.
iRow
=
pRow
->
iRow
,
.
type
=
TSDBROW_COL_FMT
,
.
pBlockData
=
pRow
->
pBlockData
};
tsdbTrace
(
"fRow ptr:%p, %d, uid:%"
PRIu64
", %s"
,
pRow
->
pBlockData
,
pRow
->
iRow
,
pLastBlockReader
->
uid
,
pReader
->
idStr
);
// only last block exists
if
((
!
mergeBlockData
)
||
(
tsLastBlock
!=
pBlockData
->
aTSKEY
[
pDumpInfo
->
rowIndex
]))
{
code
=
tryCopyDistinctRowFromSttBlock
(
p
Row
,
pLastBlockReader
,
pBlockScanInfo
,
tsLastBlock
,
pReader
,
&
copied
);
code
=
tryCopyDistinctRowFromSttBlock
(
&
f
Row
,
pLastBlockReader
,
pBlockScanInfo
,
tsLastBlock
,
pReader
,
&
copied
);
if
(
code
)
{
return
code
;
}
...
...
@@ -2150,7 +2155,7 @@ static int32_t doMergeFileBlockAndLastBlock(SLastBlockReader* pLastBlockReader,
pBlockScanInfo
->
lastKey
=
tsLastBlock
;
return
TSDB_CODE_SUCCESS
;
}
else
{
code
=
tsdbRowMergerAdd
(
&
pReader
->
status
.
merger
,
p
Row
,
pReader
->
pSchema
);
code
=
tsdbRowMergerAdd
(
&
pReader
->
status
.
merger
,
&
f
Row
,
pReader
->
pSchema
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
...
...
@@ -2174,7 +2179,7 @@ static int32_t doMergeFileBlockAndLastBlock(SLastBlockReader* pLastBlockReader,
}
}
}
else
{
// not merge block data
code
=
tsdbRowMergerAdd
(
&
pReader
->
status
.
merger
,
p
Row
,
pReader
->
pSchema
);
code
=
tsdbRowMergerAdd
(
&
pReader
->
status
.
merger
,
&
f
Row
,
pReader
->
pSchema
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录