Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2a073282
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
2a073282
编写于
9月 21, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' of
https://github.com/taosdata/TDengine
into feat/stream_compression
上级
a8b91991
c4c532bd
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
194 addition
and
41 deletion
+194
-41
Jenkinsfile2
Jenkinsfile2
+3
-3
docs/en/28-releases/01-tdengine.md
docs/en/28-releases/01-tdengine.md
+3
-0
docs/en/28-releases/02-tools.md
docs/en/28-releases/02-tools.md
+4
-0
docs/zh/28-releases/01-tdengine.md
docs/zh/28-releases/01-tdengine.md
+3
-0
docs/zh/28-releases/02-tools.md
docs/zh/28-releases/02-tools.md
+4
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-0
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+5
-35
source/libs/tdb/src/db/tdbPage.c
source/libs/tdb/src/db/tdbPage.c
+4
-2
tests/parallel_test/run_container.sh
tests/parallel_test/run_container.sh
+9
-1
tests/system-test/0-others/compatibility.py
tests/system-test/0-others/compatibility.py
+157
-0
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+1
-0
未找到文件。
Jenkinsfile2
浏览文件 @
2a073282
...
@@ -218,12 +218,12 @@ def pre_test_win(){
...
@@ -218,12 +218,12 @@ def pre_test_win(){
if (env.CHANGE_URL =~ /\/TDengine\//) {
if (env.CHANGE_URL =~ /\/TDengine\//) {
bat '''
bat '''
cd %WIN_INTERNAL_ROOT%
cd %WIN_INTERNAL_ROOT%
git pull
git pull
origin ''' + env.CHANGE_TARGET + '''
'''
'''
bat '''
bat '''
cd %WIN_COMMUNITY_ROOT%
cd %WIN_COMMUNITY_ROOT%
git remote prune origin
git remote prune origin
git pull
git pull
origin ''' + env.CHANGE_TARGET + '''
'''
'''
bat '''
bat '''
cd %WIN_COMMUNITY_ROOT%
cd %WIN_COMMUNITY_ROOT%
...
@@ -236,7 +236,7 @@ def pre_test_win(){
...
@@ -236,7 +236,7 @@ def pre_test_win(){
} else if (env.CHANGE_URL =~ /\/TDinternal\//) {
} else if (env.CHANGE_URL =~ /\/TDinternal\//) {
bat '''
bat '''
cd %WIN_INTERNAL_ROOT%
cd %WIN_INTERNAL_ROOT%
git pull
git pull
origin ''' + env.CHANGE_TARGET + '''
'''
'''
bat '''
bat '''
cd %WIN_INTERNAL_ROOT%
cd %WIN_INTERNAL_ROOT%
...
...
docs/en/28-releases/01-tdengine.md
浏览文件 @
2a073282
...
@@ -6,6 +6,9 @@ description: TDengine release history, Release Notes and download links.
...
@@ -6,6 +6,9 @@ description: TDengine release history, Release Notes and download links.
import Release from "/components/ReleaseV3";
import Release from "/components/ReleaseV3";
## 3.0.1.2
<Release
type=
"tdengine"
version=
"3.0.1.2"
/>
## 3.0.1.1
## 3.0.1.1
...
...
docs/en/28-releases/02-tools.md
浏览文件 @
2a073282
...
@@ -6,6 +6,10 @@ description: taosTools release history, Release Notes, download links.
...
@@ -6,6 +6,10 @@ description: taosTools release history, Release Notes, download links.
import Release from "/components/ReleaseV3";
import Release from "/components/ReleaseV3";
## 2.2.2
<Release
type=
"tools"
version=
"2.2.2"
/>
## 2.2.0
## 2.2.0
<Release
type=
"tools"
version=
"2.2.0"
/>
<Release
type=
"tools"
version=
"2.2.0"
/>
...
...
docs/zh/28-releases/01-tdengine.md
浏览文件 @
2a073282
...
@@ -6,6 +6,9 @@ description: TDengine 发布历史、Release Notes 及下载链接
...
@@ -6,6 +6,9 @@ description: TDengine 发布历史、Release Notes 及下载链接
import Release from "/components/ReleaseV3";
import Release from "/components/ReleaseV3";
## 3.0.1.2
<Release
type=
"tdengine"
version=
"3.0.1.2"
/>
## 3.0.1.1
## 3.0.1.1
...
...
docs/zh/28-releases/02-tools.md
浏览文件 @
2a073282
...
@@ -6,6 +6,10 @@ description: taosTools 的发布历史、Release Notes 和下载链接
...
@@ -6,6 +6,10 @@ description: taosTools 的发布历史、Release Notes 和下载链接
import Release from "/components/ReleaseV3";
import Release from "/components/ReleaseV3";
## 2.2.2
<Release
type=
"tools"
version=
"2.2.2"
/>
## 2.2.0
## 2.2.0
<Release
type=
"tools"
version=
"2.2.0"
/>
<Release
type=
"tools"
version=
"2.2.0"
/>
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
2a073282
...
@@ -1687,6 +1687,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
...
@@ -1687,6 +1687,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
while
(
1
)
{
while
(
1
)
{
if
(
pInfo
->
tqReader
->
pMsg
==
NULL
)
{
if
(
pInfo
->
tqReader
->
pMsg
==
NULL
)
{
if
(
pInfo
->
validBlockIndex
>=
totBlockNum
)
{
if
(
pInfo
->
validBlockIndex
>=
totBlockNum
)
{
updateInfoDestoryColseWinSBF
(
pInfo
->
pUpdateInfo
);
return
NULL
;
return
NULL
;
}
}
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
2a073282
...
@@ -1695,6 +1695,7 @@ void destroyStreamFinalIntervalOperatorInfo(void* param) {
...
@@ -1695,6 +1695,7 @@ void destroyStreamFinalIntervalOperatorInfo(void* param) {
}
}
nodesDestroyNode
((
SNode
*
)
pInfo
->
pPhyNode
);
nodesDestroyNode
((
SNode
*
)
pInfo
->
pPhyNode
);
colDataDestroy
(
&
pInfo
->
twAggSup
.
timeWindowData
);
colDataDestroy
(
&
pInfo
->
twAggSup
.
timeWindowData
);
cleanupGroupResInfo
(
&
pInfo
->
groupResInfo
);
taosMemoryFreeClear
(
param
);
taosMemoryFreeClear
(
param
);
}
}
...
@@ -3073,6 +3074,7 @@ void processPullOver(SSDataBlock* pBlock, SHashObj* pMap) {
...
@@ -3073,6 +3074,7 @@ void processPullOver(SSDataBlock* pBlock, SHashObj* pMap) {
taosArrayRemove
(
chArray
,
index
);
taosArrayRemove
(
chArray
,
index
);
if
(
taosArrayGetSize
(
chArray
)
==
0
)
{
if
(
taosArrayGetSize
(
chArray
)
==
0
)
{
// pull data is over
// pull data is over
taosArrayDestroy
(
chArray
);
taosHashRemove
(
pMap
,
&
winRes
,
sizeof
(
SWinKey
));
taosHashRemove
(
pMap
,
&
winRes
,
sizeof
(
SWinKey
));
}
}
}
}
...
@@ -3109,9 +3111,6 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
...
@@ -3109,9 +3111,6 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
SStreamFinalIntervalOperatorInfo
*
pInfo
=
pOperator
->
info
;
SStreamFinalIntervalOperatorInfo
*
pInfo
=
pOperator
->
info
;
SOperatorInfo
*
downstream
=
pOperator
->
pDownstream
[
0
];
SOperatorInfo
*
downstream
=
pOperator
->
pDownstream
[
0
];
SArray
*
pUpdated
=
taosArrayInit
(
4
,
POINTER_BYTES
);
_hash_fn_t
hashFn
=
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
);
SHashObj
*
pUpdatedMap
=
taosHashInit
(
1024
,
hashFn
,
false
,
HASH_NO_LOCK
);
TSKEY
maxTs
=
INT64_MIN
;
TSKEY
maxTs
=
INT64_MIN
;
TSKEY
minTs
=
INT64_MAX
;
TSKEY
minTs
=
INT64_MAX
;
...
@@ -3175,6 +3174,9 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
...
@@ -3175,6 +3174,9 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
}
}
}
}
SArray
*
pUpdated
=
taosArrayInit
(
4
,
POINTER_BYTES
);
_hash_fn_t
hashFn
=
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
);
SHashObj
*
pUpdatedMap
=
taosHashInit
(
1024
,
hashFn
,
false
,
HASH_NO_LOCK
);
while
(
1
)
{
while
(
1
)
{
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
if
(
pBlock
==
NULL
)
{
if
(
pBlock
==
NULL
)
{
...
@@ -5755,8 +5757,6 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
...
@@ -5755,8 +5757,6 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
_hash_fn_t
hashFn
=
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
);
_hash_fn_t
hashFn
=
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
);
SHashObj
*
pUpdatedMap
=
taosHashInit
(
1024
,
hashFn
,
false
,
HASH_NO_LOCK
);
SHashObj
*
pUpdatedMap
=
taosHashInit
(
1024
,
hashFn
,
false
,
HASH_NO_LOCK
);
SStreamState
*
pState
=
pTaskInfo
->
streamInfo
.
pState
;
while
(
1
)
{
while
(
1
)
{
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
if
(
pBlock
==
NULL
)
{
if
(
pBlock
==
NULL
)
{
...
@@ -5805,36 +5805,6 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
...
@@ -5805,36 +5805,6 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
}
}
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
maxTs
);
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
maxTs
);
pInfo
->
twAggSup
.
minTs
=
TMIN
(
pInfo
->
twAggSup
.
minTs
,
minTs
);
pInfo
->
twAggSup
.
minTs
=
TMIN
(
pInfo
->
twAggSup
.
minTs
,
minTs
);
#if 0
if (pState) {
printf(">>>>>>>> stream read backend\n");
SWinKey key = {
.ts = 1,
.groupId = 2,
};
char* val = NULL;
int32_t sz;
if (streamStateGet(pState, &key, (void**)&val, &sz) < 0) {
ASSERT(0);
}
printf("stream read %s %d\n", val, sz);
streamFreeVal(val);
SStreamStateCur* pCur = streamStateGetCur(pState, &key);
ASSERT(pCur);
while (streamStateCurNext(pState, pCur) == 0) {
SWinKey key1;
const void* val1;
if (streamStateGetKVByCur(pCur, &key1, &val1, &sz) < 0) {
break;
}
printf("stream iter key groupId:%d ts:%d, value %s %d\n", key1.groupId, key1.ts, val1, sz);
}
streamStateFreeCur(pCur);
}
#endif
pOperator
->
status
=
OP_RES_TO_RETURN
;
pOperator
->
status
=
OP_RES_TO_RETURN
;
closeStreamIntervalWindow
(
pInfo
->
aggSup
.
pResultRowHashTable
,
&
pInfo
->
twAggSup
,
&
pInfo
->
interval
,
NULL
,
pUpdatedMap
,
closeStreamIntervalWindow
(
pInfo
->
aggSup
.
pResultRowHashTable
,
&
pInfo
->
twAggSup
,
&
pInfo
->
interval
,
NULL
,
pUpdatedMap
,
pOperator
);
pOperator
);
...
...
source/libs/tdb/src/db/tdbPage.c
浏览文件 @
2a073282
...
@@ -80,6 +80,7 @@ int tdbPageDestroy(SPage *pPage, void (*xFree)(void *arg, void *ptr), void *arg)
...
@@ -80,6 +80,7 @@ int tdbPageDestroy(SPage *pPage, void (*xFree)(void *arg, void *ptr), void *arg)
ASSERT
(
xFree
);
ASSERT
(
xFree
);
for
(
int
iOvfl
=
0
;
iOvfl
<
pPage
->
nOverflow
;
iOvfl
++
)
{
for
(
int
iOvfl
=
0
;
iOvfl
<
pPage
->
nOverflow
;
iOvfl
++
)
{
tdbDebug
(
"tdbPage/destroy/free ovfl cell: %p/%p"
,
pPage
->
apOvfl
[
iOvfl
],
pPage
);
tdbOsFree
(
pPage
->
apOvfl
[
iOvfl
]);
tdbOsFree
(
pPage
->
apOvfl
[
iOvfl
]);
}
}
...
@@ -152,7 +153,7 @@ int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell, u8 asOvfl
...
@@ -152,7 +153,7 @@ int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell, u8 asOvfl
pNewCell
=
(
SCell
*
)
tdbOsMalloc
(
szCell
);
pNewCell
=
(
SCell
*
)
tdbOsMalloc
(
szCell
);
memcpy
(
pNewCell
,
pCell
,
szCell
);
memcpy
(
pNewCell
,
pCell
,
szCell
);
tdbDebug
(
"tdbPage/
new ovfl cell: %p"
,
pNewCell
);
tdbDebug
(
"tdbPage/
insert/new ovfl cell: %p/%p"
,
pNewCell
,
pPage
);
pPage
->
apOvfl
[
iOvfl
]
=
pNewCell
;
pPage
->
apOvfl
[
iOvfl
]
=
pNewCell
;
pPage
->
aiOvfl
[
iOvfl
]
=
idx
;
pPage
->
aiOvfl
[
iOvfl
]
=
idx
;
...
@@ -202,7 +203,7 @@ int tdbPageDropCell(SPage *pPage, int idx, TXN *pTxn, SBTree *pBt) {
...
@@ -202,7 +203,7 @@ int tdbPageDropCell(SPage *pPage, int idx, TXN *pTxn, SBTree *pBt) {
if
(
pPage
->
aiOvfl
[
iOvfl
]
==
idx
)
{
if
(
pPage
->
aiOvfl
[
iOvfl
]
==
idx
)
{
// remove the over flow cell
// remove the over flow cell
tdbOsFree
(
pPage
->
apOvfl
[
iOvfl
]);
tdbOsFree
(
pPage
->
apOvfl
[
iOvfl
]);
tdbDebug
(
"tdbPage/free ovfl cell: %p"
,
pPage
->
apOvfl
[
iOvfl
]);
tdbDebug
(
"tdbPage/
drop/
free ovfl cell: %p"
,
pPage
->
apOvfl
[
iOvfl
]);
for
(;
(
++
iOvfl
)
<
pPage
->
nOverflow
;)
{
for
(;
(
++
iOvfl
)
<
pPage
->
nOverflow
;)
{
pPage
->
aiOvfl
[
iOvfl
-
1
]
=
pPage
->
aiOvfl
[
iOvfl
]
-
1
;
pPage
->
aiOvfl
[
iOvfl
-
1
]
=
pPage
->
aiOvfl
[
iOvfl
]
-
1
;
pPage
->
apOvfl
[
iOvfl
-
1
]
=
pPage
->
apOvfl
[
iOvfl
];
pPage
->
apOvfl
[
iOvfl
-
1
]
=
pPage
->
apOvfl
[
iOvfl
];
...
@@ -255,6 +256,7 @@ void tdbPageCopy(SPage *pFromPage, SPage *pToPage, int deepCopyOvfl) {
...
@@ -255,6 +256,7 @@ void tdbPageCopy(SPage *pFromPage, SPage *pToPage, int deepCopyOvfl) {
int
szCell
=
(
*
pFromPage
->
xCellSize
)(
pFromPage
,
pFromPage
->
apOvfl
[
iOvfl
],
0
,
NULL
,
NULL
);
int
szCell
=
(
*
pFromPage
->
xCellSize
)(
pFromPage
,
pFromPage
->
apOvfl
[
iOvfl
],
0
,
NULL
,
NULL
);
pNewCell
=
(
SCell
*
)
tdbOsMalloc
(
szCell
);
pNewCell
=
(
SCell
*
)
tdbOsMalloc
(
szCell
);
memcpy
(
pNewCell
,
pFromPage
->
apOvfl
[
iOvfl
],
szCell
);
memcpy
(
pNewCell
,
pFromPage
->
apOvfl
[
iOvfl
],
szCell
);
tdbDebug
(
"tdbPage/copy/new ovfl cell: %p/%p/%p"
,
pNewCell
,
pToPage
,
pFromPage
);
}
}
pToPage
->
apOvfl
[
iOvfl
]
=
pNewCell
;
pToPage
->
apOvfl
[
iOvfl
]
=
pNewCell
;
...
...
tests/parallel_test/run_container.sh
浏览文件 @
2a073282
...
@@ -79,9 +79,11 @@ fi
...
@@ -79,9 +79,11 @@ fi
ulimit
-c
unlimited
ulimit
-c
unlimited
TMP_DIR
=
$WORKDIR
/tmp
TMP_DIR
=
$WORKDIR
/tmp
SOURCEDIR
=
$WORKDIR
/src
MOUNT_DIR
=
""
MOUNT_DIR
=
""
packageName
=
"TDengine-server-3.0.1.0-Linux-x64.tar.gz"
rm
-rf
${
TMP_DIR
}
/thread_volume/
$thread_no
/sim
rm
-rf
${
TMP_DIR
}
/thread_volume/
$thread_no
/sim
mkdir
-p
$SOURCEDIR
mkdir
-p
${
TMP_DIR
}
/thread_volume/
$thread_no
/sim/tsim
mkdir
-p
${
TMP_DIR
}
/thread_volume/
$thread_no
/sim/tsim
mkdir
-p
${
TMP_DIR
}
/thread_volume/
$thread_no
/coredump
mkdir
-p
${
TMP_DIR
}
/thread_volume/
$thread_no
/coredump
rm
-rf
${
TMP_DIR
}
/thread_volume/
$thread_no
/coredump/
*
rm
-rf
${
TMP_DIR
}
/thread_volume/
$thread_no
/coredump/
*
...
@@ -90,6 +92,11 @@ if [ ! -d "${TMP_DIR}/thread_volume/$thread_no/$exec_dir" ]; then
...
@@ -90,6 +92,11 @@ if [ ! -d "${TMP_DIR}/thread_volume/$thread_no/$exec_dir" ]; then
echo
"cp -rf
${
REPDIR
}
/tests/
$subdir
${
TMP_DIR
}
/thread_volume/
$thread_no
/"
echo
"cp -rf
${
REPDIR
}
/tests/
$subdir
${
TMP_DIR
}
/thread_volume/
$thread_no
/"
cp
-rf
${
REPDIR
}
/tests/
$subdir
${
TMP_DIR
}
/thread_volume/
$thread_no
/
cp
-rf
${
REPDIR
}
/tests/
$subdir
${
TMP_DIR
}
/thread_volume/
$thread_no
/
fi
fi
if
[
!
-f
"
${
SOURCEDIR
}
/
${
packageName
}
"
]
;
then
wget
-P
${
SOURCEDIR
}
https://taosdata.com/assets-download/3.0/
${
packageName
}
fi
MOUNT_DIR
=
"
$TMP_DIR
/thread_volume/
$thread_no
/
$exec_dir
:
$CONTAINER_TESTDIR
/tests/
$exec_dir
"
MOUNT_DIR
=
"
$TMP_DIR
/thread_volume/
$thread_no
/
$exec_dir
:
$CONTAINER_TESTDIR
/tests/
$exec_dir
"
echo
"
$thread_no
->
${
exec_dir
}
:
$cmd
"
echo
"
$thread_no
->
${
exec_dir
}
:
$cmd
"
coredump_dir
=
`
cat
/proc/sys/kernel/core_pattern | xargs
dirname
`
coredump_dir
=
`
cat
/proc/sys/kernel/core_pattern | xargs
dirname
`
...
@@ -97,6 +104,7 @@ coredump_dir=`cat /proc/sys/kernel/core_pattern | xargs dirname`
...
@@ -97,6 +104,7 @@ coredump_dir=`cat /proc/sys/kernel/core_pattern | xargs dirname`
docker run
\
docker run
\
-v
$REP_MOUNT_PARAM
\
-v
$REP_MOUNT_PARAM
\
-v
$MOUNT_DIR
\
-v
$MOUNT_DIR
\
-v
${
SOURCEDIR
}
:/usr/local/src/
\
-v
"
$TMP_DIR
/thread_volume/
$thread_no
/sim:
${
SIM_DIR
}
"
\
-v
"
$TMP_DIR
/thread_volume/
$thread_no
/sim:
${
SIM_DIR
}
"
\
-v
${
TMP_DIR
}
/thread_volume/
$thread_no
/coredump:
$coredump_dir
\
-v
${
TMP_DIR
}
/thread_volume/
$thread_no
/coredump:
$coredump_dir
\
-v
$WORKDIR
/taos-connector-python/taos:/usr/local/lib/python3.8/site-packages/taos:ro
\
-v
$WORKDIR
/taos-connector-python/taos:/usr/local/lib/python3.8/site-packages/taos:ro
\
...
...
tests/system-test/0-others/compatibility.py
0 → 100644
浏览文件 @
2a073282
from
urllib.parse
import
uses_relative
import
taos
import
sys
import
os
import
time
from
util.log
import
*
from
util.sql
import
*
from
util.cases
import
*
from
util.dnodes
import
*
from
util.dnodes
import
TDDnodes
from
util.dnodes
import
TDDnode
from
util.cluster
import
*
class
TDTestCase
:
def
caseDescription
(
self
):
'''
3.0 data compatibility test
case1: basedata version is 3.0.1.0
'''
return
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
f
"start to excute
{
__file__
}
"
)
tdSql
.
init
(
conn
.
cursor
())
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
else
:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
break
return
buildPath
def
getCfgPath
(
self
):
buildPath
=
self
.
getBuildPath
()
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
cfgPath
=
buildPath
+
"/../sim/dnode1/cfg/"
else
:
cfgPath
=
buildPath
+
"/../sim/dnode1/cfg/"
return
cfgPath
def
installTaosd
(
self
,
bPath
,
cPath
):
# os.system(f"rmtaos && mkdir -p {self.getBuildPath()}/build/lib/temp && mv {self.getBuildPath()}/build/lib/libtaos.so* {self.getBuildPath()}/build/lib/temp/ ")
# os.system(f" mv {bPath}/build {bPath}/build_bak ")
# os.system(f"mv {self.getBuildPath()}/build/lib/libtaos.so {self.getBuildPath()}/build/lib/libtaos.so_bak ")
# os.system(f"mv {self.getBuildPath()}/build/lib/libtaos.so.1 {self.getBuildPath()}/build/lib/libtaos.so.1_bak ")
packagePath
=
"/usr/local/src/"
packageName
=
"TDengine-server-3.0.1.0-Linux-x64.tar.gz"
os
.
system
(
f
"cd
{
packagePath
}
&& tar xvf TDengine-server-3.0.1.0-Linux-x64.tar.gz && cd TDengine-server-3.0.1.0 && ./install.sh -e no "
)
tdDnodes
.
stop
(
1
)
print
(
f
"start taosd: nohup taosd -c
{
cPath
}
& "
)
os
.
system
(
f
" nohup taosd -c
{
cPath
}
& "
)
sleep
(
1
)
def
buildTaosd
(
self
,
bPath
):
# os.system(f"mv {bPath}/build_bak {bPath}/build ")
os
.
system
(
f
" cd
{
bPath
}
&& make install "
)
def
run
(
self
):
bPath
=
self
.
getBuildPath
()
cPath
=
self
.
getCfgPath
()
dbname
=
"test"
stb
=
f
"
{
dbname
}
.meters"
self
.
installTaosd
(
bPath
,
cPath
)
tableNumbers
=
100
recordNumbers1
=
100
recordNumbers2
=
1000
tdsqlF
=
tdCom
.
newTdSql
()
print
(
tdsqlF
)
tdsqlF
.
query
(
f
"SELECT SERVER_VERSION();"
)
print
(
tdsqlF
.
query
(
f
"SELECT SERVER_VERSION();"
))
oldServerVersion
=
tdsqlF
.
queryResult
[
0
][
0
]
tdLog
.
info
(
f
"Base server version is
{
oldServerVersion
}
"
)
tdsqlF
.
query
(
f
"SELECT CLIENT_VERSION();"
)
# the oldClientVersion can't be updated in the same python process,so the version is new compiled verison
oldClientVersion
=
tdsqlF
.
queryResult
[
0
][
0
]
tdLog
.
info
(
f
"Base client version is
{
oldClientVersion
}
"
)
tdLog
.
printNoPrefix
(
f
"==========step1:prepare and check data in old version-
{
oldServerVersion
}
"
)
tdLog
.
info
(
f
"taosBenchmark -t
{
tableNumbers
}
-n
{
recordNumbers1
}
-y "
)
os
.
system
(
f
"taosBenchmark -t
{
tableNumbers
}
-n
{
recordNumbers1
}
-y "
)
sleep
(
3
)
# tdsqlF.query(f"select count(*) from {stb}")
# tdsqlF.checkData(0,0,tableNumbers*recordNumbers1)
os
.
system
(
"pkill taosd"
)
sleep
(
1
)
tdLog
.
printNoPrefix
(
"==========step2:update new version "
)
self
.
buildTaosd
(
bPath
)
tdDnodes
.
start
(
1
)
sleep
(
1
)
tdsql
=
tdCom
.
newTdSql
()
print
(
tdsql
)
tdsql
.
query
(
f
"SELECT SERVER_VERSION();"
)
nowServerVersion
=
tdsql
.
queryResult
[
0
][
0
]
tdLog
.
info
(
f
"New server version is
{
nowServerVersion
}
"
)
tdsql
.
query
(
f
"SELECT CLIENT_VERSION();"
)
nowClientVersion
=
tdsql
.
queryResult
[
0
][
0
]
tdLog
.
info
(
f
"New client version is
{
nowClientVersion
}
"
)
tdLog
.
printNoPrefix
(
f
"==========step3:prepare and check data in new version-
{
nowServerVersion
}
"
)
tdsql
.
query
(
f
"select count(*) from
{
stb
}
"
)
tdsql
.
checkData
(
0
,
0
,
tableNumbers
*
recordNumbers1
)
os
.
system
(
f
"taosBenchmark -t
{
tableNumbers
}
-n
{
recordNumbers2
}
-y "
)
tdsql
.
query
(
f
"select count(*) from
{
stb
}
"
)
tdsql
.
checkData
(
0
,
0
,
tableNumbers
*
recordNumbers2
)
tdsql
=
tdCom
.
newTdSql
()
tdLog
.
printNoPrefix
(
f
"==========step4:verify backticks in taos Sql-TD18542"
)
tdsql
.
execute
(
"drop database if exists db"
)
tdsql
.
execute
(
"create database db"
)
tdsql
.
execute
(
"use db"
)
tdsql
.
execute
(
"create stable db.stb1 (ts timestamp, c1 int) tags (t1 int);"
)
tdsql
.
execute
(
"insert into db.ct1 using db.stb1 TAGS(1) values(now(),11);"
)
tdsql
.
error
(
" insert into `db.ct2` using db.stb1 TAGS(9) values(now(),11);"
)
tdsql
.
error
(
" insert into db.`db.ct2` using db.stb1 TAGS(9) values(now(),11);"
)
tdsql
.
execute
(
"insert into `db`.ct3 using db.stb1 TAGS(3) values(now(),13);"
)
tdsql
.
query
(
"select * from db.ct3"
)
tdsql
.
checkData
(
0
,
1
,
13
)
tdsql
.
execute
(
"insert into db.`ct4` using db.stb1 TAGS(4) values(now(),14);"
)
tdsql
.
query
(
"select * from db.ct4"
)
tdsql
.
checkData
(
0
,
1
,
14
)
tdsql
.
query
(
"describe information_schema.ins_databases;"
)
qRows
=
tdsql
.
queryRows
for
i
in
range
(
qRows
)
:
if
tdsql
.
queryResult
[
i
][
0
]
==
"retentions"
:
return
True
else
:
return
False
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tests/system-test/fulltest.sh
浏览文件 @
2a073282
...
@@ -17,6 +17,7 @@ python3 ./test.py -f 0-others/udf_cfg2.py
...
@@ -17,6 +17,7 @@ python3 ./test.py -f 0-others/udf_cfg2.py
python3 ./test.py
-f
0-others/sysinfo.py
python3 ./test.py
-f
0-others/sysinfo.py
python3 ./test.py
-f
0-others/user_control.py
python3 ./test.py
-f
0-others/user_control.py
python3 ./test.py
-f
0-others/fsync.py
python3 ./test.py
-f
0-others/fsync.py
python3 ./test.py
-f
0-others/compatibility.py
python3 ./test.py
-f
1-insert/influxdb_line_taosc_insert.py
python3 ./test.py
-f
1-insert/influxdb_line_taosc_insert.py
python3 ./test.py
-f
1-insert/opentsdb_telnet_line_taosc_insert.py
python3 ./test.py
-f
1-insert/opentsdb_telnet_line_taosc_insert.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录