Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b5b4cd2a
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
b5b4cd2a
编写于
6月 02, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): load del info with upper version limitation.
上级
cca69f30
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
28 addition
and
15 deletion
+28
-15
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+1
-1
source/dnode/vnode/src/tsdb/tsdbCache.c
source/dnode/vnode/src/tsdb/tsdbCache.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbDataIter.c
source/dnode/vnode/src/tsdb/tsdbDataIter.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+13
-4
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+8
-4
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+2
-2
source/libs/wal/src/walRead.c
source/libs/wal/src/walRead.c
+1
-1
未找到文件。
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
b5b4cd2a
...
...
@@ -297,7 +297,7 @@ int32_t tsdbUpdateDelFileHdr(SDelFWriter *pWriter);
// SDelFReader
int32_t
tsdbDelFReaderOpen
(
SDelFReader
**
ppReader
,
SDelFile
*
pFile
,
STsdb
*
pTsdb
);
int32_t
tsdbDelFReaderClose
(
SDelFReader
**
ppReader
);
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
);
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
,
int64_t
maxVer
);
int32_t
tsdbReadDelIdx
(
SDelFReader
*
pReader
,
SArray
*
aDelIdx
);
// tsdbRead.c ==============================================================================================
int32_t
tsdbTakeReadSnap
(
STsdbReader
*
pReader
,
_query_reseek_func_t
reseek
,
STsdbReadSnap
**
ppSnap
);
...
...
source/dnode/vnode/src/tsdb/tsdbCache.c
浏览文件 @
b5b4cd2a
...
...
@@ -1454,7 +1454,7 @@ static int32_t getTableDelDataFromDelIdx(SDelFReader *pDelReader, SDelIdx *pDelI
int32_t
code
=
0
;
if
(
pDelIdx
)
{
code
=
tsdbReadDelData
(
pDelReader
,
pDelIdx
,
aDelData
);
code
=
tsdbReadDelData
(
pDelReader
,
pDelIdx
,
aDelData
,
INT64_MAX
);
}
return
code
;
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
b5b4cd2a
...
...
@@ -266,7 +266,7 @@ static int32_t tsdbCommitTableDel(SCommitter *pCommitter, STbData *pTbData, SDel
suid
=
pDelIdx
->
suid
;
uid
=
pDelIdx
->
uid
;
code
=
tsdbReadDelData
(
pCommitter
->
pDelFReader
,
pDelIdx
,
pCommitter
->
aDelData
);
code
=
tsdbReadDelData
(
pCommitter
->
pDelFReader
,
pDelIdx
,
pCommitter
->
aDelData
,
INT64_MAX
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
}
else
{
taosArrayClear
(
pCommitter
->
aDelData
);
...
...
source/dnode/vnode/src/tsdb/tsdbDataIter.c
浏览文件 @
b5b4cd2a
...
...
@@ -412,7 +412,7 @@ static int32_t tsdbTombFileDataIterNext(STsdbDataIter2* pIter, STsdbFilterInfo*
}
}
code
=
tsdbReadDelData
(
pIter
->
tIter
.
pReader
,
pDelIdx
,
pIter
->
tIter
.
aDelData
);
code
=
tsdbReadDelData
(
pIter
->
tIter
.
pReader
,
pDelIdx
,
pIter
->
tIter
.
aDelData
,
INT64_MAX
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
pIter
->
delInfo
.
suid
=
pDelIdx
->
suid
;
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
b5b4cd2a
...
...
@@ -2967,7 +2967,7 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
SDelIdx
*
pIdx
=
taosArraySearch
(
pReader
->
pDelIdx
,
&
idx
,
tCmprDelIdx
,
TD_EQ
);
if
(
pIdx
!=
NULL
)
{
code
=
tsdbReadDelData
(
pReader
->
pDelFReader
,
pIdx
,
pDelData
);
code
=
tsdbReadDelData
(
pReader
->
pDelFReader
,
pIdx
,
pDelData
,
pReader
->
verRange
.
maxVer
);
}
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_err
;
...
...
@@ -2978,7 +2978,10 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
if
(
pMemTbData
!=
NULL
)
{
p
=
pMemTbData
->
pHead
;
while
(
p
)
{
taosArrayPush
(
pDelData
,
p
);
if
(
p
->
version
<=
pReader
->
verRange
.
maxVer
)
{
taosArrayPush
(
pDelData
,
p
);
}
p
=
p
->
pNext
;
}
}
...
...
@@ -2986,7 +2989,9 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
if
(
piMemTbData
!=
NULL
)
{
p
=
piMemTbData
->
pHead
;
while
(
p
)
{
taosArrayPush
(
pDelData
,
p
);
if
(
p
->
version
<=
pReader
->
verRange
.
maxVer
)
{
taosArrayPush
(
pDelData
,
p
);
}
p
=
p
->
pNext
;
}
}
...
...
@@ -4558,7 +4563,11 @@ int32_t tsdbReaderOpen(void* pVnode, SQueryTableDataCond* pCond, void* pTableLis
pReader
->
pIgnoreTables
=
pIgnoreTables
;
tsdbDebug
(
"%p total numOfTable:%d in this query %s"
,
pReader
,
numOfTables
,
pReader
->
idStr
);
tsdbDebug
(
"%p total numOfTable:%d, window:%"
PRId64
" - %"
PRId64
", verRange:%"
PRId64
" - %"
PRId64
" in this query %s"
,
pReader
,
numOfTables
,
pReader
->
window
.
skey
,
pReader
->
window
.
ekey
,
pReader
->
verRange
.
minVer
,
pReader
->
verRange
.
maxVer
,
pReader
->
idStr
);
return
code
;
_err:
...
...
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
浏览文件 @
b5b4cd2a
...
...
@@ -1488,7 +1488,7 @@ int32_t tsdbDelFReaderClose(SDelFReader **ppReader) {
return
code
;
}
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
)
{
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
,
int64_t
maxVer
)
{
int32_t
code
=
0
;
int64_t
offset
=
pDelIdx
->
offset
;
int64_t
size
=
pDelIdx
->
size
;
...
...
@@ -1510,11 +1510,15 @@ int32_t tsdbReadDelData(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData
SDelData
delData
;
n
+=
tGetDelData
(
pReader
->
aBuf
[
0
]
+
n
,
&
delData
);
if
(
taosArrayPush
(
aDelData
,
&
delData
)
==
NULL
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_err
;
if
(
delData
.
version
>
maxVer
)
{
continue
;
}
if
(
taosArrayPush
(
aDelData
,
&
delData
)
==
NULL
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_err
;
}
}
ASSERT
(
n
==
size
);
return
code
;
...
...
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
浏览文件 @
b5b4cd2a
...
...
@@ -1166,7 +1166,7 @@ static int32_t tsdbSnapWriteDelTableDataStart(STsdbSnapWriter* pWriter, TABLEID*
int32_t
c
=
tTABLEIDCmprFn
(
pDelIdx
,
&
pWriter
->
tbid
);
if
(
c
<
0
)
{
code
=
tsdbReadDelData
(
pWriter
->
pDelFReader
,
pDelIdx
,
pWriter
->
pTIter
->
tIter
.
aDelData
);
code
=
tsdbReadDelData
(
pWriter
->
pDelFReader
,
pDelIdx
,
pWriter
->
pTIter
->
tIter
.
aDelData
,
INT64_MAX
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
SDelIdx
*
pDelIdxNew
=
taosArrayReserve
(
pWriter
->
aDelIdx
,
1
);
...
...
@@ -1183,7 +1183,7 @@ static int32_t tsdbSnapWriteDelTableDataStart(STsdbSnapWriter* pWriter, TABLEID*
pWriter
->
pTIter
->
tIter
.
iDelIdx
++
;
}
else
if
(
c
==
0
)
{
code
=
tsdbReadDelData
(
pWriter
->
pDelFReader
,
pDelIdx
,
pWriter
->
aDelData
);
code
=
tsdbReadDelData
(
pWriter
->
pDelFReader
,
pDelIdx
,
pWriter
->
aDelData
,
INT64_MAX
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
pWriter
->
pTIter
->
tIter
.
iDelIdx
++
;
...
...
source/libs/wal/src/walRead.c
浏览文件 @
b5b4cd2a
...
...
@@ -333,7 +333,7 @@ static int32_t walFetchBodyNew(SWalReader *pReader) {
return
-
1
;
}
wDebug
(
"vgId:%d, index:%"
PRId64
" is fetched,
cursor advance"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
);
wDebug
(
"vgId:%d, index:%"
PRId64
" is fetched,
type:%d, cursor advance"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
,
pReader
->
pHead
->
head
.
msgType
);
pReader
->
curVersion
=
ver
+
1
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录