Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e81b344b
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,发现更多精彩内容 >>
提交
e81b344b
编写于
1月 11, 2023
作者:
J
jiacy-jcy
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' into test/cyjia-main
上级
60c4efbc
dfed4e76
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
131 addition
and
30 deletion
+131
-30
cmake/taostools_CMakeLists.txt.in
cmake/taostools_CMakeLists.txt.in
+1
-1
packaging/release.sh
packaging/release.sh
+2
-2
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+2
-1
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+21
-20
source/dnode/vnode/src/tsdb/tsdbUtil.c
source/dnode/vnode/src/tsdb/tsdbUtil.c
+96
-5
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+2
-1
source/libs/wal/src/walWrite.c
source/libs/wal/src/walWrite.c
+2
-0
tests/system-test/1-insert/time_range_wise.py
tests/system-test/1-insert/time_range_wise.py
+5
-0
未找到文件。
cmake/taostools_CMakeLists.txt.in
浏览文件 @
e81b344b
...
...
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG
94d6895
GIT_TAG
5aa25e9
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
...
...
packaging/release.sh
浏览文件 @
e81b344b
...
...
@@ -273,7 +273,7 @@ if [ "$osType" != "Darwin" ]; then
[
-z
"
$taos_tools_ver
"
]
&&
taos_tools_ver
=
"0.1.0"
${
csudo
}
./make-taos-tools-deb.sh
${
top_dir
}
\
${
compile_dir
}
${
output_dir
}
${
taos_tools_ver
}
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
compile_dir
}
${
output_dir
}
${
taos_tools_ver
}
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
verNumberComp
}
fi
fi
else
...
...
@@ -298,7 +298,7 @@ if [ "$osType" != "Darwin" ]; then
[
-z
"
$taos_tools_ver
"
]
&&
taos_tools_ver
=
"0.1.0"
${
csudo
}
./make-taos-tools-rpm.sh
${
top_dir
}
\
${
compile_dir
}
${
output_dir
}
${
taos_tools_ver
}
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
compile_dir
}
${
output_dir
}
${
taos_tools_ver
}
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
verNumberComp
}
fi
fi
else
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
e81b344b
...
...
@@ -308,7 +308,8 @@ void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps) {
void
*
pIter
=
NULL
;
while
(
1
)
{
SDnodeObj
*
pDnode
=
NULL
;
pIter
=
sdbFetch
(
pSdb
,
SDB_DNODE
,
pIter
,
(
void
**
)
&
pDnode
);
ESdbStatus
objStatus
=
0
;
pIter
=
sdbFetchAll
(
pSdb
,
SDB_DNODE
,
pIter
,
(
void
**
)
&
pDnode
,
&
objStatus
,
true
);
if
(
pIter
==
NULL
)
break
;
SDnodeEp
dnodeEp
=
{
0
};
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
e81b344b
...
...
@@ -2333,32 +2333,33 @@ static int32_t buildComposedDataBlockImpl(STsdbReader* pReader, STableBlockScanI
SBlockData
*
pBlockData
,
SLastBlockReader
*
pLastBlockReader
)
{
SFileBlockDumpInfo
*
pDumpInfo
=
&
pReader
->
status
.
fBlockDumpInfo
;
TSDBROW
*
pRow
=
NULL
,
*
piRow
=
NULL
;
int64_t
key
=
(
pBlockData
->
nRow
>
0
&&
(
!
pDumpInfo
->
allDumped
))
?
pBlockData
->
aTSKEY
[
pDumpInfo
->
rowIndex
]
:
INT64_MIN
;
if
(
pBlockScanInfo
->
iter
.
hasVal
&&
pBlockScanInfo
->
iiter
.
hasVal
)
{
return
doMergeMultiLevelRows
(
pReader
,
pBlockScanInfo
,
pBlockData
,
pLastBlockReader
);
}
else
{
TSDBROW
*
pRow
=
NULL
,
*
piRow
=
NULL
;
if
(
pBlockScanInfo
->
iter
.
hasVal
)
{
pRow
=
getValidMemRow
(
&
pBlockScanInfo
->
iter
,
pBlockScanInfo
->
delSkyline
,
pReader
);
}
if
(
pBlockScanInfo
->
iter
.
hasVal
)
{
pRow
=
getValidMemRow
(
&
pBlockScanInfo
->
iter
,
pBlockScanInfo
->
delSkyline
,
pReader
);
}
if
(
pBlockScanInfo
->
iiter
.
hasVal
)
{
piRow
=
getValidMemRow
(
&
pBlockScanInfo
->
iiter
,
pBlockScanInfo
->
delSkyline
,
pReader
);
}
if
(
pBlockScanInfo
->
iiter
.
hasVal
)
{
piRow
=
getValidMemRow
(
&
pBlockScanInfo
->
iiter
,
pBlockScanInfo
->
delSkyline
,
pReader
);
}
// imem + file + last block
if
(
pBlockScanInfo
->
iiter
.
hasVal
)
{
return
doMergeBufAndFileRows
(
pReader
,
pBlockScanInfo
,
piRow
,
&
pBlockScanInfo
->
iiter
,
key
,
pLastBlockReader
);
}
// two levels of mem-table does contain the valid rows
if
(
pRow
!=
NULL
&&
piRow
!=
NULL
)
{
return
doMergeMultiLevelRows
(
pReader
,
pBlockScanInfo
,
pBlockData
,
pLastBlockReader
);
}
//
mem + file + last block
if
(
pBlockScanInfo
->
iter
.
hasVal
)
{
return
doMergeBufAndFileRows
(
pReader
,
pBlockScanInfo
,
pRow
,
&
pBlockScanInfo
->
iter
,
key
,
pLastBlockReader
);
}
// i
mem + file + last block
if
(
pBlockScanInfo
->
i
iter
.
hasVal
)
{
return
doMergeBufAndFileRows
(
pReader
,
pBlockScanInfo
,
piRow
,
&
pBlockScanInfo
->
i
iter
,
key
,
pLastBlockReader
);
}
// files data blocks + last block
return
mergeFileBlockAndLastBlock
(
pReader
,
pLastBlockReader
,
key
,
pBlockScanInfo
,
pBlockData
);
// mem + file + last block
if
(
pBlockScanInfo
->
iter
.
hasVal
)
{
return
doMergeBufAndFileRows
(
pReader
,
pBlockScanInfo
,
pRow
,
&
pBlockScanInfo
->
iter
,
key
,
pLastBlockReader
);
}
// files data blocks + last block
return
mergeFileBlockAndLastBlock
(
pReader
,
pLastBlockReader
,
key
,
pBlockScanInfo
,
pBlockData
);
}
static
int32_t
loadNeighborIfOverlap
(
SFileDataBlockInfo
*
pBlockInfo
,
STableBlockScanInfo
*
pBlockScanInfo
,
...
...
source/dnode/vnode/src/tsdb/tsdbUtil.c
浏览文件 @
e81b344b
...
...
@@ -682,6 +682,18 @@ int32_t tRowMergerInit2(SRowMerger *pMerger, STSchema *pResTSchema, TSDBROW *pRo
}
tsdbRowGetColVal
(
pRow
,
pTSchema
,
jCol
++
,
pColVal
);
if
((
!
COL_VAL_IS_NONE
(
pColVal
))
&&
(
!
COL_VAL_IS_NULL
(
pColVal
))
&&
IS_VAR_DATA_TYPE
(
pColVal
->
type
))
{
uint8_t
*
pVal
=
pColVal
->
value
.
pData
;
pColVal
->
value
.
pData
=
NULL
;
code
=
tRealloc
(
&
pColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
if
(
code
)
goto
_exit
;
if
(
pColVal
->
value
.
nData
)
{
memcpy
(
pColVal
->
value
.
pData
,
pVal
,
pColVal
->
value
.
nData
);
}
}
if
(
taosArrayPush
(
pMerger
->
pArray
,
pColVal
)
==
NULL
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_exit
;
...
...
@@ -720,12 +732,35 @@ int32_t tRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) {
if
(
key
.
version
>
pMerger
->
version
)
{
if
(
!
COL_VAL_IS_NONE
(
pColVal
))
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
if
((
!
COL_VAL_IS_NULL
(
pColVal
))
&&
IS_VAR_DATA_TYPE
(
pColVal
->
type
))
{
SColVal
*
tColVal
=
taosArrayGet
(
pMerger
->
pArray
,
iCol
);
code
=
tRealloc
(
&
tColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
if
(
code
)
return
code
;
tColVal
->
value
.
nData
=
pColVal
->
value
.
nData
;
if
(
pColVal
->
value
.
nData
)
{
memcpy
(
tColVal
->
value
.
pData
,
pColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
}
tColVal
->
flag
=
0
;
}
else
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
}
}
}
else
if
(
key
.
version
<
pMerger
->
version
)
{
SColVal
*
tColVal
=
(
SColVal
*
)
taosArrayGet
(
pMerger
->
pArray
,
iCol
);
if
(
COL_VAL_IS_NONE
(
tColVal
)
&&
!
COL_VAL_IS_NONE
(
pColVal
))
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
if
((
!
COL_VAL_IS_NULL
(
pColVal
))
&&
IS_VAR_DATA_TYPE
(
pColVal
->
type
))
{
code
=
tRealloc
(
&
tColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
if
(
code
)
return
code
;
tColVal
->
value
.
nData
=
pColVal
->
value
.
nData
;
if
(
pColVal
->
value
.
nData
)
{
memcpy
(
tColVal
->
value
.
pData
,
pColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
}
tColVal
->
flag
=
0
;
}
else
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
}
}
}
else
{
ASSERT
(
0
&&
"dup versions not allowed"
);
...
...
@@ -765,6 +800,18 @@ int32_t tRowMergerInit(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) {
// other
for
(
int16_t
iCol
=
1
;
iCol
<
pTSchema
->
numOfCols
;
iCol
++
)
{
tsdbRowGetColVal
(
pRow
,
pTSchema
,
iCol
,
pColVal
);
if
((
!
COL_VAL_IS_NONE
(
pColVal
))
&&
(
!
COL_VAL_IS_NULL
(
pColVal
))
&&
IS_VAR_DATA_TYPE
(
pColVal
->
type
))
{
uint8_t
*
pVal
=
pColVal
->
value
.
pData
;
pColVal
->
value
.
pData
=
NULL
;
code
=
tRealloc
(
&
pColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
if
(
code
)
goto
_exit
;
if
(
pColVal
->
value
.
nData
)
{
memcpy
(
pColVal
->
value
.
pData
,
pVal
,
pColVal
->
value
.
nData
);
}
}
if
(
taosArrayPush
(
pMerger
->
pArray
,
pColVal
)
==
NULL
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_exit
;
...
...
@@ -775,7 +822,16 @@ _exit:
return
code
;
}
void
tRowMergerClear
(
SRowMerger
*
pMerger
)
{
taosArrayDestroy
(
pMerger
->
pArray
);
}
void
tRowMergerClear
(
SRowMerger
*
pMerger
)
{
for
(
int32_t
iCol
=
1
;
iCol
<
pMerger
->
pTSchema
->
numOfCols
;
iCol
++
)
{
SColVal
*
pTColVal
=
taosArrayGet
(
pMerger
->
pArray
,
iCol
);
if
(
IS_VAR_DATA_TYPE
(
pTColVal
->
type
))
{
tFree
(
pTColVal
->
value
.
pData
);
}
}
taosArrayDestroy
(
pMerger
->
pArray
);
}
int32_t
tRowMerge
(
SRowMerger
*
pMerger
,
TSDBROW
*
pRow
)
{
int32_t
code
=
0
;
...
...
@@ -789,12 +845,47 @@ int32_t tRowMerge(SRowMerger *pMerger, TSDBROW *pRow) {
if
(
key
.
version
>
pMerger
->
version
)
{
if
(
!
COL_VAL_IS_NONE
(
pColVal
))
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
if
(
IS_VAR_DATA_TYPE
(
pColVal
->
type
))
{
SColVal
*
pTColVal
=
taosArrayGet
(
pMerger
->
pArray
,
iCol
);
if
(
!
COL_VAL_IS_NULL
(
pColVal
))
{
code
=
tRealloc
(
&
pTColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
if
(
code
)
goto
_exit
;
pTColVal
->
value
.
nData
=
pColVal
->
value
.
nData
;
if
(
pTColVal
->
value
.
nData
)
{
memcpy
(
pTColVal
->
value
.
pData
,
pColVal
->
value
.
pData
,
pTColVal
->
value
.
nData
);
}
pTColVal
->
flag
=
0
;
}
else
{
tFree
(
pTColVal
->
value
.
pData
);
pTColVal
->
value
.
pData
=
NULL
;
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
}
}
else
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
}
}
}
else
if
(
key
.
version
<
pMerger
->
version
)
{
SColVal
*
tColVal
=
(
SColVal
*
)
taosArrayGet
(
pMerger
->
pArray
,
iCol
);
if
(
COL_VAL_IS_NONE
(
tColVal
)
&&
!
COL_VAL_IS_NONE
(
pColVal
))
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
if
(
IS_VAR_DATA_TYPE
(
pColVal
->
type
))
{
if
(
!
COL_VAL_IS_NULL
(
pColVal
))
{
code
=
tRealloc
(
&
tColVal
->
value
.
pData
,
pColVal
->
value
.
nData
);
if
(
code
)
goto
_exit
;
tColVal
->
value
.
nData
=
pColVal
->
value
.
nData
;
if
(
tColVal
->
value
.
nData
)
{
memcpy
(
tColVal
->
value
.
pData
,
pColVal
->
value
.
pData
,
tColVal
->
value
.
nData
);
}
tColVal
->
flag
=
0
;
}
else
{
tFree
(
tColVal
->
value
.
pData
);
tColVal
->
value
.
pData
=
NULL
;
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
}
}
else
{
taosArraySet
(
pMerger
->
pArray
,
iCol
,
pColVal
);
}
}
}
else
{
ASSERT
(
0
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
e81b344b
...
...
@@ -173,7 +173,7 @@ static SResultRow* getTableGroupOutputBuf(SOperatorInfo* pOperator, uint64_t gro
if
(
NULL
==
*
pPage
)
{
return
NULL
;
}
return
(
SResultRow
*
)((
char
*
)(
*
pPage
)
+
p1
->
offset
);
}
...
...
@@ -1729,6 +1729,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
/*resetTableScanInfo(pTSInfo, pWin);*/
tsdbReaderClose
(
pTSInfo
->
base
.
dataReader
);
pTSInfo
->
base
.
dataReader
=
NULL
;
pInfo
->
pTableScanOp
->
status
=
OP_OPENED
;
pTSInfo
->
scanTimes
=
0
;
pTSInfo
->
currentGroupId
=
-
1
;
...
...
source/libs/wal/src/walWrite.c
浏览文件 @
e81b344b
...
...
@@ -635,6 +635,7 @@ int32_t walWrite(SWal *pWal, int64_t index, tmsg_t msgType, const void *body, in
}
void
walFsync
(
SWal
*
pWal
,
bool
forceFsync
)
{
taosThreadMutexLock
(
&
pWal
->
mutex
);
if
(
forceFsync
||
(
pWal
->
cfg
.
level
==
TAOS_WAL_FSYNC
&&
pWal
->
cfg
.
fsyncPeriod
==
0
))
{
wTrace
(
"vgId:%d, fileId:%"
PRId64
".idx, do fsync"
,
pWal
->
cfg
.
vgId
,
walGetCurFileFirstVer
(
pWal
));
if
(
taosFsyncFile
(
pWal
->
pIdxFile
)
<
0
)
{
...
...
@@ -647,4 +648,5 @@ void walFsync(SWal *pWal, bool forceFsync) {
strerror
(
errno
));
}
}
taosThreadMutexUnlock
(
&
pWal
->
mutex
);
}
tests/system-test/1-insert/time_range_wise.py
浏览文件 @
e81b344b
...
...
@@ -600,6 +600,11 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step4:after wal, all check again "
)
self
.
all_test
()
# add for TS-2440
for
i
in
range
(
self
.
rows
):
tdSql
.
execute
(
"drop database if exists db3 "
)
tdSql
.
execute
(
"create database db3 retentions 1s:4m,2s:8m,3s:12m"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录