Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
55016293
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看板
提交
55016293
编写于
8月 05, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/TD-11274-3.0
上级
14d396b0
e99782f4
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
260 addition
and
43 deletion
+260
-43
cmake/taosws_CMakeLists.txt.in
cmake/taosws_CMakeLists.txt.in
+1
-1
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+5
-4
source/libs/sync/inc/syncEnv.h
source/libs/sync/inc/syncEnv.h
+6
-6
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+40
-6
source/libs/sync/src/syncReplication.c
source/libs/sync/src/syncReplication.c
+2
-1
source/libs/sync/src/syncTimeout.c
source/libs/sync/src/syncTimeout.c
+4
-2
source/libs/sync/src/syncUtil.c
source/libs/sync/src/syncUtil.c
+4
-1
tests/pytest/crash_gen/crash_gen_main.py
tests/pytest/crash_gen/crash_gen_main.py
+2
-1
tests/script/sh/bit_and.c
tests/script/sh/bit_and.c
+7
-3
tests/script/sh/compile_udf.sh
tests/script/sh/compile_udf.sh
+10
-0
tests/script/sh/sqr_sum.c
tests/script/sh/sqr_sum.c
+5
-5
tests/script/tsim/query/udf.sim
tests/script/tsim/query/udf.sim
+161
-0
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+13
-13
未找到文件。
cmake/taosws_CMakeLists.txt.in
浏览文件 @
55016293
...
...
@@ -2,7 +2,7 @@
# taosws-rs
ExternalProject_Add(taosws-rs
GIT_REPOSITORY https://github.com/taosdata/taosws-rs.git
GIT_TAG
9fa7e2f
GIT_TAG
648cc62
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosws-rs"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
...
...
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
55016293
...
...
@@ -448,7 +448,8 @@ int32_t vnodeProcessSyncMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
}
}
vTrace
(
"vgId:%d, sync msg:%p is processed, type:%s code:0x%x"
,
pVnode
->
config
.
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
code
);
vTrace
(
"vgId:%d, sync msg:%p is processed, type:%s code:0x%x"
,
pVnode
->
config
.
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
code
);
syncNodeRelease
(
pSyncNode
);
if
(
code
!=
0
&&
terrno
==
0
)
{
terrno
=
TSDB_CODE_SYN_INTERNAL_ERROR
;
...
...
@@ -629,8 +630,8 @@ static int32_t vnodeSnapshotStartWrite(struct SSyncFSM *pFsm, void *pParam, void
static
int32_t
vnodeSnapshotStopWrite
(
struct
SSyncFSM
*
pFsm
,
void
*
pWriter
,
bool
isApply
,
SSnapshot
*
pSnapshot
)
{
#ifdef USE_TSDB_SNAPSHOT
SVnode
*
pVnode
=
pFsm
->
data
;
vInfo
(
"vgId:%d, stop write vnode snapshot, apply:%d, index:%"
PRId64
" term:%"
PRIu64
" config:%"
PRId64
,
pVnode
->
config
.
vgId
,
isApply
,
pSnapshot
->
lastApplyIndex
,
pSnapshot
->
lastApplyTerm
,
pSnapshot
->
lastConfigIndex
);
vInfo
(
"vgId:%d, stop write vnode snapshot, apply:%d, index:%"
PRId64
" term:%"
PRIu64
" config:%"
PRId64
,
p
Vnode
->
config
.
vgId
,
isApply
,
p
Snapshot
->
lastApplyIndex
,
pSnapshot
->
lastApplyTerm
,
pSnapshot
->
lastConfigIndex
);
int32_t
code
=
vnodeSnapWriterClose
(
pWriter
,
!
isApply
,
pSnapshot
);
vInfo
(
"vgId:%d, apply vnode snapshot finished, code:0x%x"
,
pVnode
->
config
.
vgId
,
code
);
...
...
@@ -707,7 +708,7 @@ int32_t vnodeSyncOpen(SVnode *pVnode, char *path) {
}
setPingTimerMS
(
pVnode
->
sync
,
5000
);
setElectTimerMS
(
pVnode
->
sync
,
13
00
);
setElectTimerMS
(
pVnode
->
sync
,
28
00
);
setHeartbeatTimerMS
(
pVnode
->
sync
,
900
);
return
0
;
}
...
...
source/libs/sync/inc/syncEnv.h
浏览文件 @
55016293
...
...
@@ -28,13 +28,13 @@ extern "C" {
#include "trpc.h"
#include "ttimer.h"
#define TIMER_MAX_MS 0x7FFFFFFF
#define ENV_TICK_TIMER_MS 1000
#define PING_TIMER_MS 5000
#define ELECT_TIMER_MS_MIN
13
00
#define ELECT_TIMER_MS_MAX (ELECT_TIMER_MS_MIN * 2)
#define TIMER_MAX_MS
0x7FFFFFFF
#define ENV_TICK_TIMER_MS
1000
#define PING_TIMER_MS
5000
#define ELECT_TIMER_MS_MIN
50
00
#define ELECT_TIMER_MS_MAX
(ELECT_TIMER_MS_MIN * 2)
#define ELECT_TIMER_MS_RANGE (ELECT_TIMER_MS_MAX - ELECT_TIMER_MS_MIN)
#define HEARTBEAT_TIMER_MS 900
#define HEARTBEAT_TIMER_MS
900
#define EMPTY_RAFT_ID ((SRaftId){.addr = 0, .vgId = 0})
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
55016293
...
...
@@ -730,7 +730,8 @@ int32_t syncNodeProposeBatch(SSyncNode* pSyncNode, SRpcMsg** pMsgPArr, bool* pIs
for
(
int
i
=
0
;
i
<
arrSize
;
++
i
)
{
do
{
char
eventLog
[
128
];
snprintf
(
eventLog
,
sizeof
(
eventLog
),
"propose message, type:%s batch:%d"
,
TMSG_INFO
(
pMsgPArr
[
i
]
->
msgType
),
arrSize
);
snprintf
(
eventLog
,
sizeof
(
eventLog
),
"propose message, type:%s batch:%d"
,
TMSG_INFO
(
pMsgPArr
[
i
]
->
msgType
),
arrSize
);
syncNodeEventLog
(
pSyncNode
,
eventLog
);
}
while
(
0
);
...
...
@@ -834,7 +835,8 @@ int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak) {
rpcFreeCont
(
rpcMsg
.
pCont
);
syncRespMgrDel
(
pSyncNode
->
pSyncRespMgr
,
seqNum
);
ret
=
1
;
sDebug
(
"vgId:%d, sync optimize index:%"
PRId64
", type:%s"
,
pSyncNode
->
vgId
,
retIndex
,
TMSG_INFO
(
pMsg
->
msgType
));
sDebug
(
"vgId:%d, sync optimize index:%"
PRId64
", type:%s"
,
pSyncNode
->
vgId
,
retIndex
,
TMSG_INFO
(
pMsg
->
msgType
));
}
else
{
ret
=
-
1
;
terrno
=
TSDB_CODE_SYN_INTERNAL_ERROR
;
...
...
@@ -1114,7 +1116,7 @@ void syncNodeStart(SSyncNode* pSyncNode) {
}
int32_t
ret
=
0
;
ret
=
syncNodeStartPingTimer
(
pSyncNode
);
//
ret = syncNodeStartPingTimer(pSyncNode);
ASSERT
(
ret
==
0
);
}
...
...
@@ -1250,6 +1252,13 @@ int32_t syncNodeStartElectTimer(SSyncNode* pSyncNode, int32_t ms) {
taosTmrReset
(
pSyncNode
->
FpElectTimerCB
,
pSyncNode
->
electTimerMS
,
pSyncNode
,
gSyncEnv
->
pTimerManager
,
&
pSyncNode
->
pElectTimer
);
atomic_store_64
(
&
pSyncNode
->
electTimerLogicClock
,
pSyncNode
->
electTimerLogicClockUser
);
do
{
char
logBuf
[
128
];
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"elect timer reset, ms:%d"
,
ms
);
syncNodeEventLog
(
pSyncNode
,
logBuf
);
}
while
(
0
);
}
else
{
sError
(
"vgId:%d, start elect timer error, sync env is stop"
,
pSyncNode
->
vgId
);
}
...
...
@@ -1281,6 +1290,14 @@ int32_t syncNodeResetElectTimer(SSyncNode* pSyncNode) {
electMS
=
syncUtilElectRandomMS
(
pSyncNode
->
electBaseLine
,
2
*
pSyncNode
->
electBaseLine
);
}
ret
=
syncNodeRestartElectTimer
(
pSyncNode
,
electMS
);
do
{
char
logBuf
[
128
];
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"reset elect timer, min:%d, max:%d, ms:%d"
,
pSyncNode
->
electBaseLine
,
2
*
pSyncNode
->
electBaseLine
,
electMS
);
syncNodeEventLog
(
pSyncNode
,
logBuf
);
}
while
(
0
);
return
ret
;
}
...
...
@@ -1293,6 +1310,13 @@ int32_t syncNodeStartHeartbeatTimer(SSyncNode* pSyncNode) {
}
else
{
sError
(
"vgId:%d, start heartbeat timer error, sync env is stop"
,
pSyncNode
->
vgId
);
}
do
{
char
logBuf
[
128
];
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"start heartbeat timer, ms:%d"
,
pSyncNode
->
heartbeatTimerMS
);
syncNodeEventLog
(
pSyncNode
,
logBuf
);
}
while
(
0
);
return
ret
;
}
...
...
@@ -1304,6 +1328,13 @@ int32_t syncNodeStartNowHeartbeatTimer(SSyncNode* pSyncNode) {
}
else
{
sError
(
"vgId:%d, start heartbeat timer error, sync env is stop"
,
pSyncNode
->
vgId
);
}
do
{
char
logBuf
[
128
];
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"start heartbeat timer, ms:%d"
,
1
);
syncNodeEventLog
(
pSyncNode
,
logBuf
);
}
while
(
0
);
return
ret
;
}
...
...
@@ -1312,6 +1343,8 @@ int32_t syncNodeStopHeartbeatTimer(SSyncNode* pSyncNode) {
atomic_add_fetch_64
(
&
pSyncNode
->
heartbeatTimerLogicClockUser
,
1
);
taosTmrStop
(
pSyncNode
->
pHeartbeatTimer
);
pSyncNode
->
pHeartbeatTimer
=
NULL
;
sTrace
(
"vgId:%d, stop heartbeat timer"
,
pSyncNode
->
vgId
);
return
ret
;
}
...
...
@@ -1559,12 +1592,13 @@ void syncNodeEventLog(const SSyncNode* pSyncNode, char* str) {
", sby:%d, "
"stgy:%d, bch:%d, "
"r-num:%d, "
"lcfg:%"
PRId64
", chging:%d, rsto:%d, %s"
,
"lcfg:%"
PRId64
", chging:%d, rsto:%d,
elt:%"
PRId64
", hb:%"
PRId64
",
%s"
,
pSyncNode
->
vgId
,
syncUtilState2String
(
pSyncNode
->
state
),
str
,
pSyncNode
->
pRaftStore
->
currentTerm
,
pSyncNode
->
commitIndex
,
logBeginIndex
,
logLastIndex
,
snapshot
.
lastApplyIndex
,
snapshot
.
lastApplyTerm
,
pSyncNode
->
pRaftCfg
->
isStandBy
,
pSyncNode
->
pRaftCfg
->
snapshotStrategy
,
pSyncNode
->
pRaftCfg
->
batchSize
,
pSyncNode
->
replicaNum
,
pSyncNode
->
pRaftCfg
->
lastConfigIndex
,
pSyncNode
->
changing
,
pSyncNode
->
restoreFinish
,
printStr
);
pSyncNode
->
restoreFinish
,
pSyncNode
->
electTimerLogicClockUser
,
pSyncNode
->
heartbeatTimerLogicClockUser
,
printStr
);
}
else
{
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"%s"
,
str
);
}
...
...
@@ -1894,7 +1928,7 @@ void syncNodeDoConfigChange(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncInde
// Raft 3.6.2 Committing entries from previous terms
syncNodeAppendNoop
(
pSyncNode
);
#if 0 // simon
#if 0
// simon
syncNodeReplicate(pSyncNode);
#endif
syncMaybeAdvanceCommitIndex
(
pSyncNode
);
...
...
source/libs/sync/src/syncReplication.c
浏览文件 @
55016293
...
...
@@ -141,7 +141,8 @@ int32_t syncNodeAppendEntriesPeersSnapshot2(SSyncNode* pSyncNode) {
", match-index:%d, raftid:%"
PRId64
,
pSyncNode
->
vgId
,
nextIndex
,
newNextIndex
,
SYNC_INDEX_INVALID
,
pDestId
->
addr
);
syncNodeRestartNowHeartbeatTimer
(
pSyncNode
);
// syncNodeRestartNowHeartbeatTimer(pSyncNode);
syncNodeStartNowHeartbeatTimer
(
pSyncNode
);
return
-
1
;
}
...
...
source/libs/sync/src/syncTimeout.c
浏览文件 @
55016293
...
...
@@ -48,14 +48,16 @@ int32_t syncNodeOnTimeoutCb(SSyncNode* ths, SyncTimeout* pMsg) {
}
else
if
(
pMsg
->
timeoutType
==
SYNC_TIMEOUT_ELECTION
)
{
if
(
atomic_load_64
(
&
ths
->
electTimerLogicClockUser
)
<=
pMsg
->
logicClock
)
{
++
(
ths
->
electTimerCounter
);
sInfo
(
"vgId:%d, sync timeout, type:election count:%d"
,
ths
->
vgId
,
ths
->
electTimerCounter
);
sInfo
(
"vgId:%d, sync timeout, type:election count:%d, electTimerLogicClockUser:%ld"
,
ths
->
vgId
,
ths
->
electTimerCounter
,
ths
->
electTimerLogicClockUser
);
syncNodeElect
(
ths
);
}
}
else
if
(
pMsg
->
timeoutType
==
SYNC_TIMEOUT_HEARTBEAT
)
{
if
(
atomic_load_64
(
&
ths
->
heartbeatTimerLogicClockUser
)
<=
pMsg
->
logicClock
)
{
++
(
ths
->
heartbeatTimerCounter
);
sInfo
(
"vgId:%d, sync timeout, type:replicate count:%d"
,
ths
->
vgId
,
ths
->
heartbeatTimerCounter
);
sInfo
(
"vgId:%d, sync timeout, type:replicate count:%d, heartbeatTimerLogicClockUser:%ld"
,
ths
->
vgId
,
ths
->
heartbeatTimerCounter
,
ths
->
heartbeatTimerLogicClockUser
);
syncNodeReplicate
(
ths
);
}
}
else
{
...
...
source/libs/sync/src/syncUtil.c
浏览文件 @
55016293
...
...
@@ -125,7 +125,10 @@ int32_t syncUtilRand(int32_t max) { return taosRand() % max; }
int32_t
syncUtilElectRandomMS
(
int32_t
min
,
int32_t
max
)
{
ASSERT
(
min
>
0
&&
max
>
0
&&
max
>=
min
);
return
min
+
syncUtilRand
(
max
-
min
);
int32_t
rdm
=
min
+
syncUtilRand
(
max
-
min
);
// sDebug("random min:%d, max:%d, rdm:%d", min, max, rdm);
return
rdm
;
}
int32_t
syncUtilQuorum
(
int32_t
replicaNum
)
{
return
replicaNum
/
2
+
1
;
}
...
...
tests/pytest/crash_gen/crash_gen_main.py
浏览文件 @
55016293
...
...
@@ -1339,8 +1339,9 @@ class Task():
0x03A1
,
# STable [does] not exist
0x03AA
,
# Tag already exists
0x0603
,
# Table already exists
0x2603
,
# Table does not exist
0x2603
,
# Table does not exist
, replaced by 2662 below
0x260d
,
# Tags number not matched
0x2662
,
# Table does not exist #TODO: what about 2603 above?
...
...
tests/script/sh/bit
wise
_and.c
→
tests/script/sh/bit_and.c
浏览文件 @
55016293
...
...
@@ -4,15 +4,15 @@
#include "taosudf.h"
DLL_EXPORT
int32_t
bit
wise
_and_init
()
{
DLL_EXPORT
int32_t
bit_and_init
()
{
return
0
;
}
DLL_EXPORT
int32_t
bit
wise
_and_destroy
()
{
DLL_EXPORT
int32_t
bit_and_destroy
()
{
return
0
;
}
DLL_EXPORT
int32_t
bit
wise
_and
(
SUdfDataBlock
*
block
,
SUdfColumn
*
resultCol
)
{
DLL_EXPORT
int32_t
bit_and
(
SUdfDataBlock
*
block
,
SUdfColumn
*
resultCol
)
{
if
(
block
->
numOfCols
<
2
)
{
return
TSDB_CODE_UDF_INVALID_INPUT
;
...
...
@@ -37,6 +37,10 @@ DLL_EXPORT int32_t bitwise_and(SUdfDataBlock* block, SUdfColumn *resultCol) {
resultData
->
numOfRows
=
block
->
numOfRows
;
for
(
int32_t
i
=
0
;
i
<
resultData
->
numOfRows
;
++
i
)
{
if
(
udfColDataIsNull
(
block
->
udfCols
[
0
],
i
))
{
udfColDataSetNull
(
resultCol
,
i
);
continue
;
}
int32_t
result
=
*
(
int32_t
*
)
udfColDataGetData
(
block
->
udfCols
[
0
],
i
);
int
j
=
1
;
for
(;
j
<
block
->
numOfCols
;
++
j
)
{
...
...
tests/script/sh/compile_udf.sh
0 → 100755
浏览文件 @
55016293
set
+e
rm
-rf
/tmp/udf/libbitand.so /tmp/udf/libsqrsum.so
mkdir
-p
/tmp/udf
echo
"compile udf bit_and and sqr_sum"
gcc
-fPIC
-shared
sh/bit_and.c
-o
/tmp/udf/libbitand.so
gcc
-fPIC
-shared
sh/sqr_sum.c
-o
/tmp/udf/libsqrsum.so
echo
"debug show /tmp/udf/*.so"
ls
/tmp/udf/
*
.so
tests/script/sh/sq
uares
_sum.c
→
tests/script/sh/sq
r
_sum.c
浏览文件 @
55016293
...
...
@@ -5,22 +5,22 @@
#include "taosudf.h"
DLL_EXPORT
int32_t
sq
uares
_sum_init
()
{
DLL_EXPORT
int32_t
sq
r
_sum_init
()
{
return
0
;
}
DLL_EXPORT
int32_t
sq
uares
_sum_destroy
()
{
DLL_EXPORT
int32_t
sq
r
_sum_destroy
()
{
return
0
;
}
DLL_EXPORT
int32_t
sq
uares
_sum_start
(
SUdfInterBuf
*
buf
)
{
DLL_EXPORT
int32_t
sq
r
_sum_start
(
SUdfInterBuf
*
buf
)
{
*
(
int64_t
*
)(
buf
->
buf
)
=
0
;
buf
->
bufLen
=
sizeof
(
double
);
buf
->
numOfResult
=
0
;
return
0
;
}
DLL_EXPORT
int32_t
sq
uares
_sum
(
SUdfDataBlock
*
block
,
SUdfInterBuf
*
interBuf
,
SUdfInterBuf
*
newInterBuf
)
{
DLL_EXPORT
int32_t
sq
r
_sum
(
SUdfDataBlock
*
block
,
SUdfInterBuf
*
interBuf
,
SUdfInterBuf
*
newInterBuf
)
{
double
sumSquares
=
*
(
double
*
)
interBuf
->
buf
;
int8_t
numNotNull
=
0
;
for
(
int32_t
i
=
0
;
i
<
block
->
numOfCols
;
++
i
)
{
...
...
@@ -67,7 +67,7 @@ DLL_EXPORT int32_t squares_sum(SUdfDataBlock* block, SUdfInterBuf *interBuf, SUd
return
0
;
}
DLL_EXPORT
int32_t
udf2
_finish
(
SUdfInterBuf
*
buf
,
SUdfInterBuf
*
resultData
)
{
DLL_EXPORT
int32_t
sqr_sum
_finish
(
SUdfInterBuf
*
buf
,
SUdfInterBuf
*
resultData
)
{
if
(
buf
->
numOfResult
==
0
)
{
resultData
->
numOfResult
=
0
;
return
0
;
...
...
tests/script/tsim/query/udf.sim
0 → 100644
浏览文件 @
55016293
system_content printf %OS%
if $system_content == Windows_NT then
return 0;
endi
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c udf -v 1
system sh/exec.sh -n dnode1 -s start
sql connect
print ======== step1 udf
system sh/compile_udf.sh
sql create database udf vgroups 3;
sql use udf;
sql show databases;
sql create table t (ts timestamp, f int);
sql insert into t values(now, 1)(now+1s, 2);
system_content printf %OS%
if $system_content == Windows_NT then
return 0;
endi
if $system_content == Windows_NT then
sql create function bit_and as 'C:\\Windows\\Temp\\bitand.dll' outputtype int bufSize 8;
sql create aggregate function sqr_sum as 'C:\\Windows\\Temp\\sqrsum.dll' outputtype double bufSize 8;
else
sql create function bit_and as '/tmp/udf/libbitand.so' outputtype int bufSize 8;
sql create aggregate function sqr_sum as '/tmp/udf/libsqrsum.so' outputtype double bufSize 8;
endi
sql show functions;
if $rows != 2 then
return -1
endi
sql select bit_and(f, f) from t;
if $rows != 2 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data10 != 2 then
return -1
endi
sql select sqr_sum(f) from t;
if $rows != 1 then
print expect 1, actual $rows
return -1
endi
if $data00 != 2.236067977 then
return -1
endi
sql create table t2 (ts timestamp, f1 int, f2 int);
sql insert into t2 values(now, 0, 0)(now+1s, 1, 1);
sql select bit_and(f1, f2) from t2;
if $rows != 2 then
return -1
endi
if $data00 != 0 then
return -1
endi
if $data10 != 1 then
return -1
endi
sql select sqr_sum(f1, f2) from t2;
if $rows != 1 then
return -1
endi
if $data00 != 1.414213562 then
return -1
endi
sql insert into t2 values(now+2s, 1, null)(now+3s, null, 2);
sql select bit_and(f1, f2) from t2;
print $rows , $data00 , $data10 , $data20 , $data30
if $rows != 4 then
return -1
endi
if $data00 != 0 then
return -1
endi
if $data10 != 1 then
return -1
endi
if $data20 != NULL then
return -1
endi
if $data30 != NULL then
return -1
endi
sql select sqr_sum(f1, f2) from t2;
print $rows, $data00
if $rows != 1 then
return -1
endi
if $data00 != 2.645751311 then
return -1
endi
sql insert into t2 values(now+4s, 4, 8)(now+5s, 5, 9);
sql select sqr_sum(f1-f2), sqr_sum(f1+f2) from t2;
print $rows , $data00 , $data01
if $rows != 1 then
return -1;
endi
if $data00 != 5.656854249 then
return -1
endi
if $data01 != 18.547236991 then
return -1
endi
sql select sqr_sum(bit_and(f2, f1)), sqr_sum(bit_and(f1, f2)) from t2;
print $rows , $data00 , $data01
if $rows != 1 then
return -1
endi
if $data00 != 1.414213562 then
return -1
endi
if $data01 != 1.414213562 then
return -1
endi
sql select sqr_sum(f2) from udf.t2 group by 1-bit_and(f1, f2) order by 1-bit_and(f1,f2);
print $rows , $data00 , $data10 , $data20
if $rows != 3 then
return -1
endi
if $data00 != 2.000000000 then
return -1
endi
if $data10 != 9.055385138 then
return -1
endi
if $data20 != 8.000000000 then
return -1
endi
sql drop function bit_and;
sql show functions;
if $rows != 1 then
return -1
endi
if $data00 != @sqr_sum@ then
return -1
endi
sql drop function sqr_sum;
sql show functions;
if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/system-test/fulltest.sh
浏览文件 @
55016293
...
...
@@ -196,28 +196,28 @@ python3 ./test.py -f 6-cluster/5dnode3mnodeStopFollowerLeader.py -N 5 -M 3
python3 ./test.py
-f
6-cluster/5dnode3mnodeStop2Follower.py
-N
5
-M
3
# vnode case
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py -N 4 -M 1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py
-N
4
-M
1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py -N 4 -M 1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
-N
4
-M
1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py -N 4 -M 1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py
-N
4
-M
1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py -N 4 -M 1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py -N 4 -M 1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py -N 4 -M 1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py -N 4 -M 1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
-N
4
-M
1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py -N 4 -M 1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py
-N
4
-M
1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py -N 4 -M 1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py -N 4 -M 1
#
python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py -N 4 -M 1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py
-N
4
-M
1
python3 ./test.py
-f
7-tmq/dropDbR3ConflictTransaction.py
-N
3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录