Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
9f622f9a
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9f622f9a
编写于
7月 23, 2020
作者:
R
root
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/query' of
https://github.com/taosdata/TDengine
into feature/query
上级
7997da5f
bdb916aa
变更
69
隐藏空白更改
内联
并排
Showing
69 changed file
with
613 addition
and
423 deletion
+613
-423
.travis.yml
.travis.yml
+1
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+30
-14
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+1
-0
src/common/src/tglobal.c
src/common/src/tglobal.c
+40
-1
src/connector/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNode.java
...or/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNode.java
+44
-7
src/connector/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNodes.java
...r/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNodes.java
+5
-27
src/connector/jdbc/src/test/java/com/taosdata/jdbc/BaseTest.java
...nector/jdbc/src/test/java/com/taosdata/jdbc/BaseTest.java
+13
-15
src/inc/taoserror.h
src/inc/taoserror.h
+1
-0
src/inc/tbalance.h
src/inc/tbalance.h
+1
-0
src/mnode/inc/mnodeDef.h
src/mnode/inc/mnodeDef.h
+15
-17
src/mnode/src/mnodeBalance.c
src/mnode/src/mnodeBalance.c
+1
-0
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+13
-5
src/mnode/src/mnodeDnode.c
src/mnode/src/mnodeDnode.c
+27
-27
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+13
-6
src/mnode/src/mnodeShow.c
src/mnode/src/mnodeShow.c
+2
-2
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+42
-26
src/mnode/src/mnodeUser.c
src/mnode/src/mnodeUser.c
+1
-1
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+20
-31
src/plugins/http/src/gcJson.c
src/plugins/http/src/gcJson.c
+4
-0
src/plugins/http/src/httpContext.c
src/plugins/http/src/httpContext.c
+1
-1
src/plugins/http/src/restJson.c
src/plugins/http/src/restJson.c
+4
-0
src/plugins/monitor/src/monitorMain.c
src/plugins/monitor/src/monitorMain.c
+11
-32
src/plugins/mqtt/src/mqttSystem.c
src/plugins/mqtt/src/mqttSystem.c
+1
-1
src/query/inc/qExtbuffer.h
src/query/inc/qExtbuffer.h
+2
-2
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+5
-1
src/tsdb/src/tsdbMemTable.c
src/tsdb/src/tsdbMemTable.c
+2
-3
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+4
-1
src/tsdb/src/tsdbRWHelper.c
src/tsdb/src/tsdbRWHelper.c
+13
-2
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+41
-22
src/util/src/tconfig.c
src/util/src/tconfig.c
+31
-22
tests/pytest/test.py
tests/pytest/test.py
+1
-1
tests/script/general/alter/dnode.sim
tests/script/general/alter/dnode.sim
+71
-0
tests/script/general/parser/stream_on_sys.sim
tests/script/general/parser/stream_on_sys.sim
+1
-1
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+6
-9
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+1
-1
tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
+6
-6
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
+8
-8
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
+8
-8
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
+6
-6
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
...t/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
+8
-8
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
...pt/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
+6
-6
tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
.../unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
+6
-6
tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim
+8
-8
tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
...unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
+8
-8
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
+4
-4
tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim
.../unique/arbitrator/offline_replica2_alterTable_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim
...pt/unique/arbitrator/offline_replica2_alterTag_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica2_createTable_online.sim
...unique/arbitrator/offline_replica2_createTable_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim
...ript/unique/arbitrator/offline_replica2_dropDb_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim
...t/unique/arbitrator/offline_replica2_dropTable_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim
.../unique/arbitrator/offline_replica3_alterTable_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim
...pt/unique/arbitrator/offline_replica3_alterTag_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica3_createTable_online.sim
...unique/arbitrator/offline_replica3_createTable_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim
...ript/unique/arbitrator/offline_replica3_dropDb_online.sim
+2
-2
tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim
...t/unique/arbitrator/offline_replica3_dropTable_online.sim
+2
-2
tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim
...script/unique/arbitrator/sync_replica2_alterTable_add.sim
+2
-2
tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim
...cript/unique/arbitrator/sync_replica2_alterTable_drop.sim
+2
-2
tests/script/unique/arbitrator/sync_replica2_dropDb.sim
tests/script/unique/arbitrator/sync_replica2_dropDb.sim
+2
-2
tests/script/unique/arbitrator/sync_replica2_dropTable.sim
tests/script/unique/arbitrator/sync_replica2_dropTable.sim
+2
-2
tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim
...script/unique/arbitrator/sync_replica3_alterTable_add.sim
+2
-2
tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim
...cript/unique/arbitrator/sync_replica3_alterTable_drop.sim
+2
-2
tests/script/unique/arbitrator/sync_replica3_createTable.sim
tests/script/unique/arbitrator/sync_replica3_createTable.sim
+2
-2
tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim
...ator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim
+14
-14
tests/script/unique/arbitrator/sync_replica3_dropDb.sim
tests/script/unique/arbitrator/sync_replica3_dropDb.sim
+2
-2
tests/script/unique/arbitrator/sync_replica3_dropTable.sim
tests/script/unique/arbitrator/sync_replica3_dropTable.sim
+2
-2
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
+6
-6
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
...s/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
+6
-6
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
...migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
+6
-6
tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
+6
-6
未找到文件。
.travis.yml
浏览文件 @
9f622f9a
...
...
@@ -63,7 +63,7 @@ matrix:
pkill -TERM -x taosd
fuser -k -n tcp 6030
sleep 1
./crash_gen.sh -a -p -t 4 -s 2
5
|| travis_terminate $?
./crash_gen.sh -a -p -t 4 -s 2
000
|| travis_terminate $?
sleep 1
cd ${TRAVIS_BUILD_DIR}/tests/pytest
...
...
src/client/src/tscSQLParser.c
浏览文件 @
9f622f9a
...
...
@@ -358,7 +358,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
}
case
TSDB_SQL_CFG_DNODE
:
{
const
char
*
msg2
=
"invalid configure options or values"
;
const
char
*
msg2
=
"invalid configure options or values
, such as resetlog / debugFlag 135 / balance 'vnode:1-dnode:2' / monitor 1
"
;
const
char
*
msg3
=
"invalid dnode ep"
;
/* validate the ip address */
...
...
@@ -4674,26 +4674,42 @@ int32_t validateDNodeConfig(tDCLSQL* pOptions) {
return
TSDB_CODE_TSC_INVALID_SQL
;
}
const
int
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
=
19
;
const
SDNodeDynConfOption
DNODE_DYNAMIC_CFG_OPTIONS
[]
=
{
{
"resetLog"
,
8
},
{
"resetQueryCache"
,
15
},
{
"debugFlag"
,
9
},
{
"mDebugFlag"
,
10
},
{
"dDebugFlag"
,
10
},
{
"sdbDebugFlag"
,
12
},
{
"vDebugFlag"
,
10
},
{
"cDebugFlag"
,
10
},
{
"httpDebugFlag"
,
13
},
{
"monitorDebugFlag"
,
16
},
{
"rpcDebugFlag"
,
12
},
{
"uDebugFlag"
,
10
},
{
"tmrDebugFlag"
,
12
},
{
"qDebugflag"
,
10
},
{
"sDebugflag"
,
10
},
{
"tsdbDebugFlag"
,
13
},
{
"mqttDebugFlag"
,
13
},
{
"wDebugFlag"
,
10
},
{
"monitor"
,
7
}};
const
int
tokenLogEnd
=
2
;
const
int
tokenBalance
=
2
;
const
int
tokenMonitor
=
3
;
const
int
tokenDebugFlag
=
4
;
const
int
tokenDebugFlagEnd
=
20
;
const
SDNodeDynConfOption
cfgOptions
[]
=
{
{
"resetLog"
,
8
},
{
"resetQueryCache"
,
15
},
{
"balance"
,
7
},
{
"monitor"
,
7
},
{
"debugFlag"
,
9
},
{
"monitorDebugFlag"
,
16
},
{
"vDebugFlag"
,
10
},
{
"mDebugFlag"
,
10
},
{
"cDebugFlag"
,
10
},
{
"httpDebugFlag"
,
13
},
{
"qDebugflag"
,
10
},
{
"sdbDebugFlag"
,
12
},
{
"uDebugFlag"
,
10
},
{
"tsdbDebugFlag"
,
13
},
{
"sDebugflag"
,
10
},
{
"rpcDebugFlag"
,
12
},
{
"dDebugFlag"
,
10
},
{
"mqttDebugFlag"
,
13
},
{
"wDebugFlag"
,
10
},
{
"tmrDebugFlag"
,
12
},
};
SSQLToken
*
pOptionToken
=
&
pOptions
->
a
[
1
];
if
(
pOptions
->
nTokens
==
2
)
{
// reset log and reset query cache does not need value
for
(
int32_t
i
=
0
;
i
<
2
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
DNODE_DYNAMIC_CFG_OPTIONS
[
i
];
for
(
int32_t
i
=
0
;
i
<
tokenLogEnd
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
cfgOptions
[
i
];
if
((
strncasecmp
(
pOption
->
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
pOption
->
len
==
pOptionToken
->
n
))
{
return
TSDB_CODE_SUCCESS
;
}
}
}
else
if
((
strncasecmp
(
DNODE_DYNAMIC_CFG_OPTIONS
[
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
-
1
].
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
DNODE_DYNAMIC_CFG_OPTIONS
[
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
-
1
].
len
==
pOptionToken
->
n
))
{
}
else
if
((
strncasecmp
(
cfgOptions
[
tokenBalance
].
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
cfgOptions
[
tokenBalance
].
len
==
pOptionToken
->
n
))
{
SSQLToken
*
pValToken
=
&
pOptions
->
a
[
2
];
int32_t
vnodeIndex
=
0
;
int32_t
dnodeIndex
=
0
;
strdequote
(
pValToken
->
z
);
bool
parseOk
=
taosCheckBalanceCfgOptions
(
pValToken
->
z
,
&
vnodeIndex
,
&
dnodeIndex
);
if
(
!
parseOk
)
{
return
TSDB_CODE_TSC_INVALID_SQL
;
// options value is invalid
}
return
TSDB_CODE_SUCCESS
;
}
else
if
((
strncasecmp
(
cfgOptions
[
tokenMonitor
].
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
cfgOptions
[
tokenMonitor
].
len
==
pOptionToken
->
n
))
{
SSQLToken
*
pValToken
=
&
pOptions
->
a
[
2
];
int32_t
val
=
strtol
(
pValToken
->
z
,
NULL
,
10
);
if
(
val
!=
0
&&
val
!=
1
)
{
...
...
@@ -4709,8 +4725,8 @@ int32_t validateDNodeConfig(tDCLSQL* pOptions) {
return
TSDB_CODE_TSC_INVALID_SQL
;
}
for
(
int32_t
i
=
2
;
i
<
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
-
1
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
DNODE_DYNAMIC_CFG_OPTIONS
[
i
];
for
(
int32_t
i
=
tokenDebugFlag
;
i
<
tokenDebugFlagEnd
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
cfgOptions
[
i
];
if
((
strncasecmp
(
pOption
->
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
pOption
->
len
==
pOptionToken
->
n
))
{
/* options is valid */
...
...
src/common/inc/tglobal.h
浏览文件 @
9f622f9a
...
...
@@ -174,6 +174,7 @@ bool taosCheckGlobalCfg();
void
taosSetAllDebugFlag
();
bool
taosCfgDynamicOptions
(
char
*
msg
);
int
taosGetFqdnPortFromEp
(
const
char
*
ep
,
char
*
fqdn
,
uint16_t
*
port
);
bool
taosCheckBalanceCfgOptions
(
const
char
*
option
,
int32_t
*
vnodeIndex
,
int32_t
*
dnodeIndex
);
#ifdef __cplusplus
}
...
...
src/common/src/tglobal.c
浏览文件 @
9f622f9a
...
...
@@ -198,6 +198,7 @@ int32_t tsdbDebugFlag = 131;
int32_t
(
*
monitorStartSystemFp
)()
=
NULL
;
void
(
*
monitorStopSystemFp
)()
=
NULL
;
void
(
*
monitorExecuteSQLFp
)(
char
*
sql
)
=
NULL
;
static
pthread_once_t
tsInitGlobalCfgOnce
=
PTHREAD_ONCE_INIT
;
...
...
@@ -252,11 +253,15 @@ bool taosCfgDynamicOptions(char *msg) {
if
(
monitorStartSystemFp
)
{
(
*
monitorStartSystemFp
)();
uInfo
(
"monitor is enabled"
);
}
else
{
uError
(
"monitor can't be updated, for monitor not initialized"
);
}
}
else
{
if
(
monitorStopSystemFp
)
{
(
*
monitorStopSystemFp
)();
uInfo
(
"monitor is disabled"
);
}
else
{
uError
(
"monitor can't be updated, for monitor not initialized"
);
}
}
return
true
;
...
...
@@ -276,7 +281,12 @@ bool taosCfgDynamicOptions(char *msg) {
}
if
(
strncasecmp
(
option
,
"resetQueryCache"
,
15
)
==
0
)
{
uError
(
"reset query cache can't be executed, for monitor not initialized"
);
if
(
monitorExecuteSQLFp
)
{
(
*
monitorExecuteSQLFp
)(
"resetQueryCache"
);
uInfo
(
"resetquerycache is executed"
);
}
else
{
uError
(
"resetquerycache can't be executed, for monitor not started"
);
}
}
return
false
;
...
...
@@ -1300,3 +1310,32 @@ int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port) {
return
0
;
}
/*
* alter dnode 1 balance "vnode:1-dnode:2"
*/
bool
taosCheckBalanceCfgOptions
(
const
char
*
option
,
int32_t
*
vnodeIndex
,
int32_t
*
dnodeIndex
)
{
int
len
=
strlen
(
option
);
if
(
strncasecmp
(
option
,
"vnode:"
,
6
)
!=
0
)
{
return
false
;
}
int
pos
=
0
;
for
(;
pos
<
len
;
++
pos
)
{
if
(
option
[
pos
]
==
'-'
)
break
;
}
if
(
++
pos
>=
len
)
return
false
;
if
(
strncasecmp
(
option
+
pos
,
"dnode:"
,
6
)
!=
0
)
{
return
false
;
}
*
vnodeIndex
=
strtol
(
option
+
6
,
NULL
,
10
);
*
dnodeIndex
=
strtol
(
option
+
pos
+
6
,
NULL
,
10
);
if
(
*
vnodeIndex
<=
1
||
*
dnodeIndex
<=
0
)
{
return
false
;
}
return
true
;
}
\ No newline at end of file
src/connector/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNode.java
浏览文件 @
9f622f9a
package
com.taosdata.jdbc.utils
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.InputStreamReader
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -31,6 +33,10 @@ public class TDNode {
this
.
testCluster
=
testCluster
;
}
public
void
setRunning
(
int
running
)
{
this
.
running
=
running
;
}
public
void
searchTaosd
(
File
dir
,
ArrayList
<
String
>
taosdPath
)
{
File
[]
fileList
=
dir
.
listFiles
();
...
...
@@ -102,15 +108,46 @@ public class TDNode {
this
.
running
=
1
;
}
public
void
stop
()
{
String
toBeKilled
=
"taosd"
;
public
Integer
getTaosdPid
()
{
String
cmd
=
"ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
;
String
[]
cmds
=
{
"sh"
,
"-c"
,
cmd
};
try
{
Process
process
=
Runtime
.
getRuntime
().
exec
(
cmds
);
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getInputStream
()));
String
line
=
null
;
Integer
res
=
null
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
if
(!
line
.
isEmpty
())
{
res
=
Integer
.
valueOf
(
line
);
break
;
}
}
return
res
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
public
void
stop
()
{
if
(
this
.
running
!=
0
)
{
String
killCmd
=
"pkill -kill -x "
+
toBeKilled
;
String
[]
killCmds
=
{
"sh"
,
"-c"
,
killCmd
};
try
{
Runtime
.
getRuntime
().
exec
(
killCmds
).
waitFor
();
Integer
pid
=
null
;
while
((
pid
=
getTaosdPid
())
!=
null
)
{
String
killCmd
=
"kill -term "
+
pid
;
String
[]
killCmds
=
{
"sh"
,
"-c"
,
killCmd
};
try
{
Runtime
.
getRuntime
().
exec
(
killCmds
).
waitFor
();
TimeUnit
.
SECONDS
.
sleep
(
2
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
try
{
for
(
int
port
=
6030
;
port
<
6041
;
port
++)
{
String
fuserCmd
=
"fuser -k -n tcp "
+
port
;
Runtime
.
getRuntime
().
exec
(
fuserCmd
).
waitFor
();
...
...
@@ -120,7 +157,7 @@ public class TDNode {
}
this
.
running
=
0
;
System
.
out
.
println
(
"dnode:"
+
this
.
index
+
" is stopped by
pkill
"
);
System
.
out
.
println
(
"dnode:"
+
this
.
index
+
" is stopped by
kill -term
"
);
}
}
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNodes.java
浏览文件 @
9f622f9a
...
...
@@ -14,33 +14,6 @@ public class TDNodes {
}
}
public
void
setPath
(
String
path
)
{
try
{
String
killCmd
=
"pkill -kill -x taosd"
;
String
[]
killCmds
=
{
"sh"
,
"-c"
,
killCmd
};
Runtime
.
getRuntime
().
exec
(
killCmds
).
waitFor
();
String
binPath
=
System
.
getProperty
(
"user.dir"
);
binPath
+=
"/../../../debug"
;
System
.
out
.
println
(
"binPath: "
+
binPath
);
File
file
=
new
File
(
path
);
binPath
=
file
.
getCanonicalPath
();
System
.
out
.
println
(
"binPath real path: "
+
binPath
);
if
(
path
.
isEmpty
()){
file
=
new
File
(
path
+
"/../../"
);
path
=
file
.
getCanonicalPath
();
}
for
(
int
i
=
0
;
i
<
tdNodes
.
size
();
i
++)
{
tdNodes
.
get
(
i
).
setPath
(
path
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
void
setTestCluster
(
boolean
testCluster
)
{
this
.
testCluster
=
testCluster
;
}
...
...
@@ -70,6 +43,11 @@ public class TDNodes {
check
(
index
);
tdNodes
.
get
(
index
-
1
).
setCfgConfig
(
option
,
value
);
}
public
TDNode
getTDNode
(
int
index
)
{
check
(
index
);
return
tdNodes
.
get
(
index
-
1
);
}
public
void
start
(
int
index
)
{
check
(
index
);
...
...
src/connector/jdbc/src/test/java/com/taosdata/jdbc/BaseTest.java
浏览文件 @
9f622f9a
package
com.taosdata.jdbc
;
import
java.io.File
;
import
com.taosdata.jdbc.utils.TDNodes
;
import
org.junit.AfterClass
;
...
...
@@ -8,31 +7,30 @@ import org.junit.BeforeClass;
public
class
BaseTest
{
private
static
boolean
testCluster
=
false
;
private
static
String
deployPath
=
System
.
getProperty
(
"user.dir"
);
private
static
TDNodes
tdNodes
=
new
TDNodes
();
private
static
boolean
testCluster
=
false
;
private
static
TDNodes
nodes
=
new
TDNodes
();
@BeforeClass
public
static
void
setupEnv
()
{
try
{
File
file
=
new
File
(
deployPath
+
"/../../../"
);
String
rootPath
=
file
.
getCanonicalPath
(
);
tdNodes
.
setPath
(
rootPath
);
tdNodes
.
setTestCluster
(
testCluster
);
try
{
if
(
nodes
.
getTDNode
(
1
).
getTaosdPid
()
!=
null
)
{
System
.
out
.
println
(
"Kill taosd before running JDBC test"
);
nodes
.
getTDNode
(
1
).
setRunning
(
1
);
nodes
.
stop
(
1
);
}
tdNodes
.
deploy
(
1
);
tdNodes
.
start
(
1
);
nodes
.
setTestCluster
(
testCluster
);
nodes
.
deploy
(
1
);
nodes
.
start
(
1
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"Base Test Exception"
);
e
.
printStackTrace
();
}
}
@AfterClass
public
static
void
cleanUpEnv
()
{
tdN
odes
.
stop
(
1
);
n
odes
.
stop
(
1
);
}
}
\ No newline at end of file
src/inc/taoserror.h
浏览文件 @
9f622f9a
...
...
@@ -227,6 +227,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, 0, 0x080B, "grant cpu
// sync
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_INVALID_CONFIG
,
0
,
0x0900
,
"sync invalid configuration"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NOT_ENABLED
,
0
,
0x0901
,
"sync module not enabled"
)
// wal
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_APP_ERROR
,
0
,
0x1000
,
"wal app error"
)
...
...
src/inc/tbalance.h
浏览文件 @
9f622f9a
...
...
@@ -29,6 +29,7 @@ void balanceAsyncNotify();
void
balanceSyncNotify
();
void
balanceReset
();
int32_t
balanceAllocVnodes
(
struct
SVgObj
*
pVgroup
);
int32_t
balanceCfgDnode
(
struct
SDnodeObj
*
pDnode
,
const
char
*
option
);
int32_t
balanceDropDnode
(
struct
SDnodeObj
*
pDnode
);
#ifdef __cplusplus
...
...
src/mnode/inc/mnodeDef.h
浏览文件 @
9f622f9a
...
...
@@ -50,8 +50,8 @@ typedef struct SDnodeObj {
int8_t
alternativeRole
;
// from dnode status msg, 0-any, 1-mgmt, 2-dnode
int8_t
status
;
// set in balance function
int8_t
isMgmt
;
int8_t
reserve1
[
1
4
];
int8_t
updateEnd
[
1
];
int8_t
reserve1
[
1
1
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
uint32_t
moduleStatus
;
uint32_t
lastReboot
;
// time stamp for last reboot
...
...
@@ -68,8 +68,8 @@ typedef struct SMnodeObj {
int32_t
mnodeId
;
int8_t
reserved0
[
4
];
int64_t
createdTime
;
int8_t
reserved1
[
7
];
int8_t
updateEnd
[
1
];
int8_t
reserved1
[
4
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
int8_t
role
;
int8_t
reserved2
[
3
];
...
...
@@ -90,8 +90,7 @@ typedef struct SSuperTableObj {
int32_t
tversion
;
int32_t
numOfColumns
;
int32_t
numOfTags
;
int8_t
reserved1
[
3
];
int8_t
updateEnd
[
1
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
int32_t
numOfTables
;
SSchema
*
schema
;
...
...
@@ -111,8 +110,7 @@ typedef struct {
int32_t
sid
;
int32_t
vgId
;
int32_t
sqlLen
;
int8_t
updateEnd
[
1
];
int8_t
reserved1
[
1
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
char
*
sql
;
//used by normal table
SSchema
*
schema
;
//used by normal table
...
...
@@ -138,8 +136,8 @@ typedef struct SVgObj {
int8_t
status
;
int8_t
reserved0
[
4
];
SVnodeGid
vnodeGid
[
TSDB_MAX_REPLICA
];
int8_t
reserved1
[
7
];
int8_t
updateEnd
[
1
];
int8_t
reserved1
[
4
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
int32_t
numOfTables
;
int64_t
totalStorage
;
...
...
@@ -176,8 +174,8 @@ typedef struct SDbObj {
int32_t
cfgVersion
;
SDbCfg
cfg
;
int8_t
status
;
int8_t
reserved1
[
1
4
];
int8_t
updateEnd
[
1
];
int8_t
reserved1
[
1
1
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
int32_t
numOfVgroups
;
int32_t
numOfTables
;
...
...
@@ -196,8 +194,8 @@ typedef struct SUserObj {
int64_t
createdTime
;
int8_t
superAuth
;
int8_t
writeAuth
;
int8_t
reserved
[
1
3
];
int8_t
updateEnd
[
1
];
int8_t
reserved
[
1
0
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
struct
SAcctObj
*
pAcct
;
}
SUserObj
;
...
...
@@ -228,11 +226,11 @@ typedef struct SAcctObj {
int64_t
createdTime
;
int32_t
acctId
;
int8_t
status
;
int8_t
reserved0
[
10
];
int8_t
updateEnd
[
1
];
SAcctInfo
acctInfo
;
int8_t
reserved0
[
7
];
int8_t
updateEnd
[
4
];
int32_t
refCount
;
int8_t
reserved1
[
4
];
SAcctInfo
acctInfo
;
pthread_mutex_t
mutex
;
}
SAcctObj
;
...
...
src/mnode/src/mnodeBalance.c
浏览文件 @
9f622f9a
...
...
@@ -28,6 +28,7 @@ void balanceCleanUp() {}
void
balanceAsyncNotify
()
{}
void
balanceSyncNotify
()
{}
void
balanceReset
()
{}
int32_t
balanceCfgDnode
(
struct
SDnodeObj
*
pDnode
,
const
char
*
option
)
{
return
TSDB_CODE_SYN_NOT_ENABLED
;
}
int32_t
balanceAllocVnodes
(
SVgObj
*
pVgroup
)
{
void
*
pIter
=
NULL
;
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
9f622f9a
...
...
@@ -67,8 +67,11 @@ static int32_t mnodeDbActionInsert(SSdbOper *pOper) {
SAcctObj
*
pAcct
=
mnodeGetAcct
(
pDb
->
acct
);
pthread_mutex_init
(
&
pDb
->
mutex
,
NULL
);
pthread_mutex_lock
(
&
pDb
->
mutex
);
pDb
->
vgListSize
=
VG_LIST_SIZE
;
pDb
->
vgList
=
calloc
(
pDb
->
vgListSize
,
sizeof
(
SVgObj
*
));
pthread_mutex_unlock
(
&
pDb
->
mutex
);
pDb
->
numOfVgroups
=
0
;
pDb
->
numOfTables
=
0
;
pDb
->
numOfSuperTables
=
0
;
...
...
@@ -395,8 +398,8 @@ static int32_t mnodeCreateDb(SAcctObj *pAcct, SCMCreateDbMsg *pCreate, void *pMs
code
=
sdbInsertRow
(
&
oper
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
mnodeDestroyDb
(
pDb
);
mLInfo
(
"db:%s, failed to create, reason:%s"
,
pDb
->
name
,
tstrerror
(
code
));
mnodeDestroyDb
(
pDb
);
return
code
;
}
else
{
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
...
...
@@ -605,7 +608,9 @@ static int32_t mnodeGetDbMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn
static
char
*
mnodeGetDbStr
(
char
*
src
)
{
char
*
pos
=
strstr
(
src
,
TS_PATH_DELIMITER
);
return
++
pos
;
if
(
pos
!=
NULL
)
++
pos
;
return
pos
;
}
static
int32_t
mnodeRetrieveDbs
(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
)
{
...
...
@@ -622,10 +627,13 @@ static int32_t mnodeRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void
cols
=
0
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
char
*
name
=
mnodeGetDbStr
(
pDb
->
name
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
name
,
pShow
->
bytes
[
cols
]);
if
(
name
!=
NULL
)
{
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
name
,
pShow
->
bytes
[
cols
]);
}
else
{
STR_TO_VARSTR
(
pWrite
,
"NULL"
);
}
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
...
src/mnode/src/mnodeDnode.c
浏览文件 @
9f622f9a
...
...
@@ -277,45 +277,45 @@ static int32_t mnodeProcessCfgDnodeMsg(SMnodeMsg *pMsg) {
SCMCfgDnodeMsg
*
pCmCfgDnode
=
pMsg
->
rpcMsg
.
pCont
;
if
(
pCmCfgDnode
->
ep
[
0
]
==
0
)
{
tstrncpy
(
pCmCfgDnode
->
ep
,
tsLocalEp
,
TSDB_EP_LEN
);
}
}
int32_t
dnodeId
=
0
;
char
*
pos
=
strchr
(
pCmCfgDnode
->
ep
,
':'
);
if
(
NULL
==
pos
)
{
dnodeId
=
strtol
(
pCmCfgDnode
->
ep
,
NULL
,
10
);
SDnodeObj
*
pDnode
=
mnodeGetDnodeByEp
(
pCmCfgDnode
->
ep
);
if
(
pDnode
==
NULL
)
{
int32_t
dnodeId
=
strtol
(
pCmCfgDnode
->
ep
,
NULL
,
10
);
if
(
dnodeId
<=
0
||
dnodeId
>
65536
)
{
mError
(
"failed to cfg dnode, invalid dnode
Id
:%s"
,
pCmCfgDnode
->
ep
);
mError
(
"failed to cfg dnode, invalid dnode
Ep
:%s"
,
pCmCfgDnode
->
ep
);
return
TSDB_CODE_MND_DNODE_NOT_EXIST
;
}
}
SRpcEpSet
epSet
=
mnodeGetEpSetFromIp
(
pCmCfgDnode
->
ep
);
if
(
dnodeId
!=
0
)
{
SDnodeObj
*
pDnode
=
mnodeGetDnode
(
dnodeId
);
pDnode
=
mnodeGetDnode
(
dnodeId
);
if
(
pDnode
==
NULL
)
{
mError
(
"failed to cfg dnode, invalid dnodeId:%d"
,
dnodeId
);
return
TSDB_CODE_MND_DNODE_NOT_EXIST
;
}
epSet
=
mnodeGetEpSetFromIp
(
pDnode
->
dnodeEp
);
mnodeDecDnodeRef
(
pDnode
);
}
SMDCfgDnodeMsg
*
pMdCfgDnode
=
rpcMallocCont
(
sizeof
(
SMDCfgDnodeMsg
));
strcpy
(
pMdCfgDnode
->
ep
,
pCmCfgDnode
->
ep
);
strcpy
(
pMdCfgDnode
->
config
,
pCmCfgDnode
->
config
);
SRpcMsg
rpcMdCfgDnodeMsg
=
{
.
ahandle
=
0
,
.
code
=
0
,
.
msgType
=
TSDB_MSG_TYPE_MD_CONFIG_DNODE
,
.
pCont
=
pMdCfgDnode
,
.
contLen
=
sizeof
(
SMDCfgDnodeMsg
)
};
mInfo
(
"dnode:%s, is configured by %s"
,
pCmCfgDnode
->
ep
,
pMsg
->
pUser
->
user
);
dnodeSendMsgToDnode
(
&
epSet
,
&
rpcMdCfgDnodeMsg
);
SRpcEpSet
epSet
=
mnodeGetEpSetFromIp
(
pDnode
->
dnodeEp
);
mnodeDecDnodeRef
(
pDnode
);
return
TSDB_CODE_SUCCESS
;
if
(
strncasecmp
(
pCmCfgDnode
->
config
,
"balance"
,
7
)
==
0
)
{
return
balanceCfgDnode
(
pDnode
,
pCmCfgDnode
->
config
+
8
);
}
else
{
SMDCfgDnodeMsg
*
pMdCfgDnode
=
rpcMallocCont
(
sizeof
(
SMDCfgDnodeMsg
));
strcpy
(
pMdCfgDnode
->
ep
,
pCmCfgDnode
->
ep
);
strcpy
(
pMdCfgDnode
->
config
,
pCmCfgDnode
->
config
);
SRpcMsg
rpcMdCfgDnodeMsg
=
{
.
ahandle
=
0
,
.
code
=
0
,
.
msgType
=
TSDB_MSG_TYPE_MD_CONFIG_DNODE
,
.
pCont
=
pMdCfgDnode
,
.
contLen
=
sizeof
(
SMDCfgDnodeMsg
)
};
mInfo
(
"dnode:%s, is configured by %s"
,
pCmCfgDnode
->
ep
,
pMsg
->
pUser
->
user
);
dnodeSendMsgToDnode
(
&
epSet
,
&
rpcMdCfgDnodeMsg
);
return
TSDB_CODE_SUCCESS
;
}
}
static
void
mnodeProcessCfgDnodeMsgRsp
(
SRpcMsg
*
rpcMsg
)
{
...
...
src/mnode/src/mnodeSdb.c
浏览文件 @
9f622f9a
...
...
@@ -406,7 +406,7 @@ void sdbDecRef(void *handle, void *pObj) {
int32_t
refCount
=
atomic_sub_fetch_32
(
pRefCount
,
1
);
sdbTrace
(
"def ref of table:%s record:%p:%s:%d"
,
pTable
->
tableName
,
pObj
,
sdbGetKeyStrFromObj
(
pTable
,
pObj
),
*
pRefCount
);
int
8_t
*
updateEnd
=
pObj
+
pTable
->
refCountPos
-
1
;
int
32_t
*
updateEnd
=
pObj
+
pTable
->
refCountPos
-
4
;
if
(
refCount
<=
0
&&
*
updateEnd
)
{
sdbTrace
(
"table:%s, record:%p:%s:%d is destroyed"
,
pTable
->
tableName
,
pObj
,
sdbGetKeyStrFromObj
(
pTable
,
pObj
),
*
pRefCount
);
SSdbOper
oper
=
{.
pObj
=
pObj
};
...
...
@@ -453,7 +453,7 @@ static int32_t sdbInsertHash(SSdbTable *pTable, SSdbOper *pOper) {
keySize
=
strlen
((
char
*
)
key
);
}
taosHashPut
(
pTable
->
iHandle
,
key
,
keySize
,
&
pOper
->
pObj
,
sizeof
(
void
**
));
taosHashPut
(
pTable
->
iHandle
,
key
,
keySize
,
&
pOper
->
pObj
,
sizeof
(
int64_t
));
sdbIncRef
(
pTable
,
pOper
->
pObj
);
atomic_add_fetch_32
(
&
pTable
->
numOfRows
,
1
);
...
...
@@ -472,6 +472,14 @@ static int32_t sdbInsertHash(SSdbTable *pTable, SSdbOper *pOper) {
}
static
int32_t
sdbDeleteHash
(
SSdbTable
*
pTable
,
SSdbOper
*
pOper
)
{
int32_t
*
updateEnd
=
pOper
->
pObj
+
pTable
->
refCountPos
-
4
;
bool
set
=
atomic_val_compare_exchange_32
(
updateEnd
,
0
,
1
)
==
0
;
if
(
!
set
)
{
sdbError
(
"table:%s, failed to delete record:%s from hash, for it already removed"
,
pTable
->
tableName
,
sdbGetKeyStrFromObj
(
pTable
,
pOper
->
pObj
));
return
TSDB_CODE_MND_SDB_OBJ_NOT_THERE
;
}
(
*
pTable
->
deleteFp
)(
pOper
);
void
*
key
=
sdbGetObjKey
(
pTable
,
pOper
->
pObj
);
...
...
@@ -486,8 +494,6 @@ static int32_t sdbDeleteHash(SSdbTable *pTable, SSdbOper *pOper) {
sdbDebug
(
"table:%s, delete record:%s from hash, numOfRows:%"
PRId64
", msg:%p"
,
pTable
->
tableName
,
sdbGetKeyStrFromObj
(
pTable
,
pOper
->
pObj
),
pTable
->
numOfRows
,
pOper
->
pMsg
);
int8_t
*
updateEnd
=
pOper
->
pObj
+
pTable
->
refCountPos
-
1
;
*
updateEnd
=
1
;
sdbDecRef
(
pTable
,
pOper
->
pObj
);
return
TSDB_CODE_SUCCESS
;
...
...
@@ -654,8 +660,9 @@ bool sdbCheckRowDeleted(void *pTableInput, void *pRow) {
SSdbTable
*
pTable
=
pTableInput
;
if
(
pTable
==
NULL
)
return
false
;
int8_t
*
updateEnd
=
pRow
+
pTable
->
refCountPos
-
1
;
return
(
*
updateEnd
==
1
);
int32_t
*
updateEnd
=
pRow
+
pTable
->
refCountPos
-
4
;
return
atomic_val_compare_exchange_32
(
updateEnd
,
1
,
1
)
==
1
;
// return (*updateEnd == 1);
}
int32_t
sdbDeleteRow
(
SSdbOper
*
pOper
)
{
...
...
src/mnode/src/mnodeShow.c
浏览文件 @
9f622f9a
...
...
@@ -236,7 +236,7 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) {
}
SCMHeartBeatMsg
*
pHBMsg
=
pMsg
->
rpcMsg
.
pCont
;
SRpcConnInfo
connInfo
;
SRpcConnInfo
connInfo
=
{
0
}
;
rpcGetConnInfo
(
pMsg
->
rpcMsg
.
handle
,
&
connInfo
);
int32_t
connId
=
htonl
(
pHBMsg
->
connId
);
...
...
@@ -284,7 +284,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
SCMConnectRsp
*
pConnectRsp
=
NULL
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
SRpcConnInfo
connInfo
;
SRpcConnInfo
connInfo
=
{
0
}
;
if
(
rpcGetConnInfo
(
pMsg
->
rpcMsg
.
handle
,
&
connInfo
)
!=
0
)
{
mError
(
"thandle:%p is already released while process connect msg"
,
pMsg
->
rpcMsg
.
handle
);
code
=
TSDB_CODE_MND_INVALID_CONNECTION
;
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
9f622f9a
...
...
@@ -72,7 +72,7 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg);
static
int32_t
mnodeProcessDropTableMsg
(
SMnodeMsg
*
mnodeMsg
);
static
int32_t
mnodeProcessDropSuperTableMsg
(
SMnodeMsg
*
pMsg
);
static
void
mnodeProcessDropSuperTableRsp
(
SRpcMsg
*
rpcMsg
);
static
int32_t
mnodeProcessDropChildTableMsg
(
SMnodeMsg
*
pMsg
,
bool
needReturn
);
static
int32_t
mnodeProcessDropChildTableMsg
(
SMnodeMsg
*
pMsg
);
static
void
mnodeProcessDropChildTableRsp
(
SRpcMsg
*
rpcMsg
);
static
int32_t
mnodeProcessSuperTableVgroupMsg
(
SMnodeMsg
*
mnodeMsg
);
...
...
@@ -759,7 +759,7 @@ static int32_t mnodeProcessDropTableMsg(SMnodeMsg *pMsg) {
SChildTableObj
*
pCTable
=
(
SChildTableObj
*
)
pMsg
->
pTable
;
mInfo
(
"app:%p:%p, table:%s, start to drop ctable, vgId:%d sid:%d uid:%"
PRIu64
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pDrop
->
tableId
,
pCTable
->
vgId
,
pCTable
->
sid
,
pCTable
->
uid
);
return
mnodeProcessDropChildTableMsg
(
pMsg
,
true
);
return
mnodeProcessDropChildTableMsg
(
pMsg
);
}
}
...
...
@@ -882,7 +882,7 @@ static int32_t mnodeProcessCreateSuperTableMsg(SMnodeMsg *pMsg) {
static
int32_t
mnodeDropSuperTableCb
(
SMnodeMsg
*
pMsg
,
int32_t
code
)
{
SSuperTableObj
*
pTable
=
(
SSuperTableObj
*
)
pMsg
->
pTable
;
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"app:%p:%p, table:%s, failed to drop, sdb error"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
mError
(
"app:%p:%p,
s
table:%s, failed to drop, sdb error"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
}
else
{
mLInfo
(
"app:%p:%p, stable:%s, is dropped from sdb"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
}
...
...
@@ -1765,18 +1765,13 @@ static int32_t mnodeProcessCreateChildTableMsg(SMnodeMsg *pMsg) {
}
}
static
int32_t
mnode
Process
DropChildTableMsg
(
SMnodeMsg
*
pMsg
,
bool
needReturn
)
{
static
int32_t
mnode
Send
DropChildTableMsg
(
SMnodeMsg
*
pMsg
,
bool
needReturn
)
{
SChildTableObj
*
pTable
=
(
SChildTableObj
*
)
pMsg
->
pTable
;
if
(
pMsg
->
pVgroup
==
NULL
)
pMsg
->
pVgroup
=
mnodeGetVgroup
(
pTable
->
vgId
);
if
(
pMsg
->
pVgroup
==
NULL
)
{
mError
(
"app:%p:%p, table:%s, failed to drop ctable, vgroup not exist"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
return
TSDB_CODE_MND_APP_ERROR
;
}
mLInfo
(
"app:%p:%p, ctable:%s, is dropped from sdb"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
SMDDropTableMsg
*
pDrop
=
rpcMallocCont
(
sizeof
(
SMDDropTableMsg
));
if
(
pDrop
==
NULL
)
{
mError
(
"app:%p:%p, table:%s, failed to drop ctable, no enough memory"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
mError
(
"app:%p:%p,
c
table:%s, failed to drop ctable, no enough memory"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
return
TSDB_CODE_MND_OUT_OF_MEMORY
;
}
...
...
@@ -1789,7 +1784,7 @@ static int32_t mnodeProcessDropChildTableMsg(SMnodeMsg *pMsg, bool needReturn) {
SRpcEpSet
epSet
=
mnodeGetEpSetFromVgroup
(
pMsg
->
pVgroup
);
mInfo
(
"app:%p:%p, table:%s, send drop ctable msg, vgId:%d sid:%d uid:%"
PRIu64
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
mInfo
(
"app:%p:%p,
c
table:%s, send drop ctable msg, vgId:%d sid:%d uid:%"
PRIu64
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pDrop
->
tableId
,
pTable
->
vgId
,
pTable
->
sid
,
pTable
->
uid
);
SRpcMsg
rpcMsg
=
{
...
...
@@ -1807,6 +1802,40 @@ static int32_t mnodeProcessDropChildTableMsg(SMnodeMsg *pMsg, bool needReturn) {
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
}
static
int32_t
mnodeDropChildTableCb
(
SMnodeMsg
*
pMsg
,
int32_t
code
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
SChildTableObj
*
pTable
=
(
SChildTableObj
*
)
pMsg
->
pTable
;
mError
(
"app:%p:%p, ctable:%s, failed to drop, sdb error"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
return
code
;
}
return
mnodeSendDropChildTableMsg
(
pMsg
,
true
);
}
static
int32_t
mnodeProcessDropChildTableMsg
(
SMnodeMsg
*
pMsg
)
{
SChildTableObj
*
pTable
=
(
SChildTableObj
*
)
pMsg
->
pTable
;
if
(
pMsg
->
pVgroup
==
NULL
)
pMsg
->
pVgroup
=
mnodeGetVgroup
(
pTable
->
vgId
);
if
(
pMsg
->
pVgroup
==
NULL
)
{
mError
(
"app:%p:%p, table:%s, failed to drop ctable, vgroup not exist"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pTable
->
info
.
tableId
);
return
TSDB_CODE_MND_APP_ERROR
;
}
SSdbOper
oper
=
{
.
type
=
SDB_OPER_GLOBAL
,
.
table
=
tsChildTableSdb
,
.
pObj
=
pTable
,
.
pMsg
=
pMsg
,
.
cb
=
mnodeDropChildTableCb
};
int32_t
code
=
sdbDeleteRow
(
&
oper
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
}
return
code
;
}
static
int32_t
mnodeFindNormalTableColumnIndex
(
SChildTableObj
*
pTable
,
char
*
colName
)
{
SSchema
*
schema
=
(
SSchema
*
)
pTable
->
schema
;
for
(
int32_t
col
=
0
;
col
<
pTable
->
numOfColumns
;
col
++
)
{
...
...
@@ -2220,19 +2249,6 @@ static void mnodeProcessDropChildTableRsp(SRpcMsg *rpcMsg) {
return
;
}
SSdbOper
oper
=
{
.
type
=
SDB_OPER_GLOBAL
,
.
table
=
tsChildTableSdb
,
.
pObj
=
pTable
};
int32_t
code
=
sdbDeleteRow
(
&
oper
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"app:%p:%p, table:%s, update ctables sdb error"
,
mnodeMsg
->
rpcMsg
.
ahandle
,
mnodeMsg
,
pTable
->
info
.
tableId
);
dnodeSendRpcMnodeWriteRsp
(
mnodeMsg
,
TSDB_CODE_MND_SDB_ERROR
);
return
;
}
if
(
mnodeMsg
->
pVgroup
->
numOfTables
<=
0
)
{
mInfo
(
"app:%p:%p, vgId:%d, all tables is dropped, drop vgroup"
,
mnodeMsg
->
rpcMsg
.
ahandle
,
mnodeMsg
,
mnodeMsg
->
pVgroup
->
vgId
);
...
...
@@ -2259,7 +2275,7 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
if
(
sdbCheckRowDeleted
(
tsChildTableSdb
,
pTable
))
{
mDebug
(
"app:%p:%p, table:%s, create table rsp received, but a deleting opertion incoming, vgId:%d sid:%d uid:%"
PRIu64
,
mnodeMsg
->
rpcMsg
.
ahandle
,
mnodeMsg
,
pTable
->
info
.
tableId
,
pTable
->
vgId
,
pTable
->
sid
,
pTable
->
uid
);
mnode
Process
DropChildTableMsg
(
mnodeMsg
,
false
);
mnode
Send
DropChildTableMsg
(
mnodeMsg
,
false
);
rpcMsg
->
code
=
TSDB_CODE_SUCCESS
;
}
...
...
src/mnode/src/mnodeUser.c
浏览文件 @
9f622f9a
...
...
@@ -358,7 +358,7 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi
}
SUserObj
*
mnodeGetUserFromConn
(
void
*
pConn
)
{
SRpcConnInfo
connInfo
;
SRpcConnInfo
connInfo
=
{
0
}
;
if
(
rpcGetConnInfo
(
pConn
,
&
connInfo
)
==
0
)
{
return
mnodeGetUser
(
connInfo
.
user
);
}
else
{
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
9f622f9a
...
...
@@ -434,15 +434,22 @@ int32_t mnodeGetAvailableVgroup(SMnodeMsg *pMsg, SVgObj **ppVgroup, int32_t *pSi
}
if
(
pDb
->
numOfVgroups
<
maxVgroupsPerDb
)
{
mDebug
(
"app:%p:%p, db:%s, try to create a new vgroup, numOfVgroups:%d maxVgroupsPerDb:%d"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pDb
->
name
,
pDb
->
numOfVgroups
,
maxVgroupsPerDb
);
mDebug
(
"app:%p:%p, db:%s, try to create a new vgroup, numOfVgroups:%d maxVgroupsPerDb:%d"
,
pMsg
->
rpcMsg
.
ahandle
,
p
Msg
,
p
Db
->
name
,
pDb
->
numOfVgroups
,
maxVgroupsPerDb
);
pthread_mutex_unlock
(
&
pDb
->
mutex
);
int32_t
code
=
mnodeCreateVgroup
(
pMsg
);
if
(
code
==
TSDB_CODE_MND_ACTION_IN_PROGRESS
)
return
code
;
if
(
code
==
TSDB_CODE_MND_ACTION_IN_PROGRESS
)
{
return
code
;
}
else
{
pthread_mutex_lock
(
&
pDb
->
mutex
);
}
}
SVgObj
*
pVgroup
=
pDb
->
vgList
[
0
];
if
(
pVgroup
==
NULL
)
return
TSDB_CODE_MND_NO_ENOUGH_DNODES
;
if
(
pVgroup
==
NULL
)
{
pthread_mutex_unlock
(
&
pDb
->
mutex
);
return
TSDB_CODE_MND_NO_ENOUGH_DNODES
;
}
int32_t
code
=
mnodeAllocVgroupIdPool
(
pVgroup
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
@@ -483,7 +490,7 @@ static int32_t mnodeCreateVgroupCb(SMnodeMsg *pMsg, int32_t code) {
}
else
{
pVgroup
->
status
=
TAOS_VG_STATUS_READY
;
SSdbOper
desc
=
{.
type
=
SDB_OPER_GLOBAL
,
.
pObj
=
pVgroup
,
.
table
=
tsVgroupSdb
};
sdbUpdateRow
(
&
desc
);
(
void
)
sdbUpdateRow
(
&
desc
);
}
mInfo
(
"app:%p:%p, vgId:%d, is created in mnode, db:%s replica:%d"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pVgroup
->
vgId
,
...
...
@@ -585,7 +592,7 @@ static int32_t mnodeGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *p
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
12
+
VARSTR_HEADER_SIZE
;
pShow
->
bytes
[
cols
]
=
8
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"status"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
...
...
@@ -612,12 +619,6 @@ static int32_t mnodeGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *p
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
40
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"end_point"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
9
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"vstatus"
);
...
...
@@ -709,27 +710,15 @@ static int32_t mnodeRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, v
*
(
int16_t
*
)
pWrite
=
pVgroup
->
vnodeGid
[
i
].
dnodeId
;
cols
++
;
SDnodeObj
*
pDnode
=
pVgroup
->
vnodeGid
[
i
].
pDnode
;
SDnodeObj
*
pDnode
=
pVgroup
->
vnodeGid
[
i
].
pDnode
;
const
char
*
role
=
"NULL"
;
if
(
pDnode
!=
NULL
)
{
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pDnode
->
dnodeEp
,
pShow
->
bytes
[
cols
]);
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
char
*
role
=
mnodeGetMnodeRoleStr
(
pVgroup
->
vnodeGid
[
i
].
role
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
role
,
pShow
->
bytes
[
cols
]);
cols
++
;
}
else
{
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
const
char
*
src
=
"NULL"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
cols
++
;
role
=
mnodeGetMnodeRoleStr
(
pVgroup
->
vnodeGid
[
i
].
role
);
}
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
role
,
pShow
->
bytes
[
cols
]);
cols
++
;
}
mnodeDecVgroupRef
(
pVgroup
);
...
...
src/plugins/http/src/gcJson.c
浏览文件 @
9f622f9a
...
...
@@ -121,6 +121,10 @@ bool gcBuildQueryJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
for
(
int
k
=
0
;
k
<
numOfRows
;
++
k
)
{
TAOS_ROW
row
=
taos_fetch_row
(
result
);
if
(
row
==
NULL
)
{
cmd
->
numOfRows
--
;
continue
;
}
int32_t
*
length
=
taos_fetch_lengths
(
result
);
// for group by
...
...
src/plugins/http/src/httpContext.c
浏览文件 @
9f622f9a
...
...
@@ -108,7 +108,7 @@ HttpContext *httpCreateContext(int32_t fd) {
pContext
->
lastAccessTime
=
taosGetTimestampSec
();
pContext
->
state
=
HTTP_CONTEXT_STATE_READY
;
HttpContext
**
ppContext
=
taosCachePut
(
tsHttpServer
.
contextCache
,
&
pContext
,
sizeof
(
void
*
),
&
pContext
,
sizeof
(
void
*
),
3
);
HttpContext
**
ppContext
=
taosCachePut
(
tsHttpServer
.
contextCache
,
&
pContext
,
sizeof
(
int64_t
),
&
pContext
,
sizeof
(
int64_t
),
3
);
pContext
->
ppContext
=
ppContext
;
httpDebug
(
"context:%p, fd:%d, is created, data:%p"
,
pContext
,
fd
,
ppContext
);
...
...
src/plugins/http/src/restJson.c
浏览文件 @
9f622f9a
...
...
@@ -94,6 +94,10 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
for
(
int
k
=
0
;
k
<
numOfRows
;
++
k
)
{
TAOS_ROW
row
=
taos_fetch_row
(
result
);
if
(
row
==
NULL
)
{
cmd
->
numOfRows
--
;
continue
;
}
int32_t
*
length
=
taos_fetch_lengths
(
result
);
// data row array begin
...
...
src/plugins/monitor/src/monitorMain.c
浏览文件 @
9f622f9a
...
...
@@ -27,7 +27,6 @@
#include "dnode.h"
#include "monitor.h"
#define monitorFatal(...) { if (monitorDebugFlag & DEBUG_FATAL) { taosPrintLog("MON FATAL ", 255, __VA_ARGS__); }}
#define monitorError(...) { if (monitorDebugFlag & DEBUG_ERROR) { taosPrintLog("MON ERROR ", 255, __VA_ARGS__); }}
#define monitorWarn(...) { if (monitorDebugFlag & DEBUG_WARN) { taosPrintLog("MON WARN ", 255, __VA_ARGS__); }}
...
...
@@ -78,6 +77,7 @@ static void monitorStartTimer();
static
void
monitorSaveSystemInfo
();
extern
int32_t
(
*
monitorStartSystemFp
)();
extern
void
(
*
monitorStopSystemFp
)();
extern
void
(
*
monitorExecuteSQLFp
)(
char
*
sql
);
static
void
monitorCheckDiskUsage
(
void
*
para
,
void
*
unused
)
{
taosGetDisk
();
...
...
@@ -207,6 +207,7 @@ static void monitorInitDatabase() {
taos_query_a
(
tsMonitorConn
.
conn
,
tsMonitorConn
.
sql
,
monitorInitDatabaseCb
,
NULL
);
}
else
{
tsMonitorConn
.
state
=
MONITOR_STATE_INITIALIZED
;
monitorExecuteSQLFp
=
monitorExecuteSQL
;
monitorInfo
(
"monitor service init success"
);
monitorStartTimer
();
...
...
@@ -230,6 +231,7 @@ static void monitorInitDatabaseCb(void *param, TAOS_RES *result, int32_t code) {
void
monitorStopSystem
()
{
monitorInfo
(
"monitor module is stopped"
);
monitorExecuteSQLFp
=
NULL
;
tsMonitorConn
.
state
=
MONITOR_STATE_STOPPED
;
if
(
tsMonitorConn
.
initTimer
!=
NULL
)
{
taosTmrStopA
(
&
(
tsMonitorConn
.
initTimer
));
...
...
@@ -248,33 +250,13 @@ static void monitorStartTimer() {
taosTmrReset
(
monitorSaveSystemInfo
,
tsMonitorInterval
*
1000
,
NULL
,
tscTmr
,
&
tsMonitorConn
.
timer
);
}
static
void
dnodeMontiorInsertAcctCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
if
(
code
<
0
)
{
monitorError
(
"monitor:%p, save account info failed, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
}
else
if
(
code
==
0
)
{
monitorError
(
"monitor:%p, save account info failed, affect rows:%d"
,
tsMonitorConn
.
conn
,
code
);
}
else
{
monitorDebug
(
"monitor:%p, save account info success, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
}
}
static
void
dnodeMontiorInsertSysCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
static
void
dnodeMontiorLogCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
if
(
code
<
0
)
{
monitorError
(
"monitor:%p, save
system info failed, code:%s %s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
),
tsMonitorConn
.
sql
);
monitorError
(
"monitor:%p, save
%s failed, reason:%s"
,
tsMonitorConn
.
conn
,
(
char
*
)
param
,
tstrerror
(
code
)
);
}
else
if
(
code
==
0
)
{
monitorError
(
"monitor:%p, save
system info failed, affect rows:%d %s"
,
tsMonitorConn
.
conn
,
code
,
tsMonitorConn
.
sql
);
monitorError
(
"monitor:%p, save
%s failed, affect rows:%d"
,
tsMonitorConn
.
conn
,
(
char
*
)
param
,
code
);
}
else
{
monitorDebug
(
"monitor:%p, save system info success, code:%s %s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
),
tsMonitorConn
.
sql
);
}
}
static
void
dnodeMontiorInsertLogCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
if
(
code
<
0
)
{
monitorError
(
"monitor:%p, save log failed, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
}
else
if
(
code
==
0
)
{
monitorError
(
"monitor:%p, save log failed, affect rows:%d"
,
tsMonitorConn
.
conn
,
code
);
}
else
{
monitorDebug
(
"monitor:%p, save log info success, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
monitorDebug
(
"monitor:%p, save %s info success, reason:%s"
,
tsMonitorConn
.
conn
,
(
char
*
)
param
,
tstrerror
(
code
));
}
}
...
...
@@ -359,7 +341,7 @@ static void monitorSaveSystemInfo() {
pos
+=
monitorBuildReqSql
(
sql
+
pos
);
monitorDebug
(
"monitor:%p, save system info, sql:%s"
,
tsMonitorConn
.
conn
,
sql
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
InsertSysCallback
,
"log
"
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
LogCallback
,
"sys
"
);
if
(
tsMonitorConn
.
timer
!=
NULL
&&
tsMonitorConn
.
state
!=
MONITOR_STATE_STOPPED
)
{
monitorStartTimer
();
...
...
@@ -397,7 +379,7 @@ void monitorSaveAcctLog(SAcctMonitorObj *pMon) {
pMon
->
accessState
);
monitorDebug
(
"monitor:%p, save account info, sql %s"
,
tsMonitorConn
.
conn
,
sql
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
InsertAcct
Callback
,
"account"
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
Log
Callback
,
"account"
);
}
void
monitorSaveLog
(
int32_t
level
,
const
char
*
const
format
,
...)
{
...
...
@@ -421,14 +403,11 @@ void monitorSaveLog(int32_t level, const char *const format, ...) {
sql
[
len
++
]
=
0
;
monitorDebug
(
"monitor:%p, save log, sql: %s"
,
tsMonitorConn
.
conn
,
sql
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
Insert
LogCallback
,
"log"
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontiorLogCallback
,
"log"
);
}
void
monitorExecuteSQL
(
char
*
sql
)
{
if
(
tsMonitorConn
.
state
!=
MONITOR_STATE_INITIALIZED
)
return
;
monitorDebug
(
"monitor:%p, execute sql: %s"
,
tsMonitorConn
.
conn
,
sql
);
// bug while insert binary
// taos_query_a(tsMonitorConn.conn, sql, NULL, NULL);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontiorLogCallback
,
"sql"
);
}
src/plugins/mqtt/src/mqttSystem.c
浏览文件 @
9f622f9a
...
...
@@ -64,7 +64,7 @@ int32_t mqttInitSystem() {
}
char
*
_begin_hostname
=
strstr
(
url
,
recntStatus
.
hostname
);
if
(
strstr
(
_begin_hostname
,
":"
)
!=
NULL
)
{
if
(
_begin_hostname
!=
NULL
&&
strstr
(
_begin_hostname
,
":"
)
!=
NULL
)
{
recntStatus
.
port
=
strbetween
(
_begin_hostname
,
":"
,
"/"
);
}
else
{
recntStatus
.
port
=
strbetween
(
"'1883'"
,
"'"
,
"'"
);
...
...
src/query/inc/qExtbuffer.h
浏览文件 @
9f622f9a
...
...
@@ -28,8 +28,8 @@ extern "C" {
#include "talgo.h"
#define MAX_TMPFILE_PATH_LENGTH PATH_MAX
#define INITIAL_ALLOCATION_BUFFER_SIZE
64
L
#define DEFAULT_PAGE_SIZE (
1024
L*(INITIAL_ALLOCATION_BUFFER_SIZE)) // 16k larger than the SHistoInfo
#define INITIAL_ALLOCATION_BUFFER_SIZE
1
L
#define DEFAULT_PAGE_SIZE (
4096
L*(INITIAL_ALLOCATION_BUFFER_SIZE)) // 16k larger than the SHistoInfo
typedef
enum
EXT_BUFFER_FLUSH_MODEL
{
/*
...
...
src/query/src/qExecutor.c
浏览文件 @
9f622f9a
...
...
@@ -6417,8 +6417,12 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
size
+=
sizeof
(
STableIdInfo
)
*
taosArrayGetSize
(
pQInfo
->
arrTableIdInfo
);
*
contLen
=
size
+
sizeof
(
SRetrieveTableRsp
);
// todo handle failed to allocate memory
// todo proper handle failed to allocate memory,
// current solution only avoid crash, but cannot return error code to client
*
pRsp
=
(
SRetrieveTableRsp
*
)
rpcMallocCont
(
*
contLen
);
if
(
*
pRsp
==
NULL
)
{
return
TSDB_CODE_QRY_OUT_OF_MEMORY
;
}
(
*
pRsp
)
->
numOfRows
=
htonl
(
pQuery
->
rec
.
rows
);
int32_t
code
=
pQInfo
->
code
;
...
...
src/tsdb/src/tsdbMemTable.c
浏览文件 @
9f622f9a
...
...
@@ -264,13 +264,11 @@ int tsdbLoadDataFromCache(STable *pTable, SSkipListIterator *pIter, TSKEY maxKey
}
do
{
if
(
numOfRows
>=
maxRowsToRead
)
break
;
SDataRow
row
=
tsdbNextIterRow
(
pIter
);
if
(
row
==
NULL
)
break
;
keyNext
=
dataRowKey
(
row
);
if
(
keyNext
<
0
||
keyNext
>
maxKey
)
break
;
if
(
keyNext
>
maxKey
)
break
;
bool
keyFiltered
=
false
;
if
(
nFilterKeys
!=
0
)
{
...
...
@@ -289,6 +287,7 @@ int tsdbLoadDataFromCache(STable *pTable, SSkipListIterator *pIter, TSKEY maxKey
}
if
(
!
keyFiltered
)
{
if
(
numOfRows
>=
maxRowsToRead
)
break
;
if
(
pCols
)
{
if
(
pSchema
==
NULL
||
schemaVersion
(
pSchema
)
!=
dataRowVersion
(
row
))
{
pSchema
=
tsdbGetTableSchemaImpl
(
pTable
,
false
,
false
,
dataRowVersion
(
row
));
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
9f622f9a
...
...
@@ -123,7 +123,10 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) {
int
tlen2
=
tsdbGetTableEncodeSize
(
TSDB_UPDATE_META
,
table
);
int
tlen
=
tlen1
+
tlen2
;
void
*
buf
=
tsdbAllocBytes
(
pRepo
,
tlen
);
ASSERT
(
buf
!=
NULL
);
if
(
buf
==
NULL
)
{
goto
_err
;
}
if
(
newSuper
)
{
void
*
pBuf
=
tsdbInsertTableAct
(
pRepo
,
TSDB_UPDATE_META
,
buf
,
super
);
ASSERT
(
POINTER_DISTANCE
(
pBuf
,
buf
)
==
tlen1
);
...
...
src/tsdb/src/tsdbRWHelper.c
浏览文件 @
9f622f9a
...
...
@@ -1477,6 +1477,11 @@ static int tsdbProcessAppendCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
if
(
tsdbInsertSuperBlock
(
pHelper
,
&
compBlock
,
pIdx
->
numOfBlocks
)
<
0
)
return
-
1
;
}
#ifndef NDEBUG
TSKEY
keyNext
=
tsdbNextIterKey
(
pCommitIter
->
pIter
);
ASSERT
(
keyNext
<
0
||
keyNext
>
pIdx
->
maxKey
);
#endif
return
0
;
}
...
...
@@ -1561,11 +1566,12 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
if
(
tsdbInsertSuperBlock
(
pHelper
,
&
compBlock
,
tblkIdx
)
<
0
)
return
-
1
;
tblkIdx
++
;
}
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
else
{
ASSERT
(
keyFirst
<=
blkKeyLast
);
int16_t
colId
=
0
;
if
(
tsdbLoadBlockDataCols
(
pHelper
,
pCompBlock
,
NULL
,
&
colId
,
1
)
<
0
)
return
-
1
;
ASSERT
(
pDataCols0
->
numOfRows
==
pCompBlock
->
numOfRows
);
slIter
=
*
(
pCommitIter
->
pIter
);
int
rows1
=
(
pCfg
->
maxRowsPerFileBlock
-
pCompBlock
->
numOfRows
);
...
...
@@ -1574,9 +1580,10 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
if
(
rows2
==
0
)
{
// all filtered out
*
(
pCommitIter
->
pIter
)
=
slIter
;
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
else
{
int
rows3
=
tsdbLoadDataFromCache
(
pTable
,
&
slIter
,
keyLimit
,
INT_MAX
,
NULL
,
NULL
,
0
)
+
rows2
;
ASSERT
(
rows3
>=
rows2
);
if
(
pCompBlock
->
numOfSubBlocks
<
TSDB_MAX_SUBBLOCKS
&&
rows1
>=
rows2
)
{
int
rows
=
(
rows1
>=
rows3
)
?
rows3
:
rows2
;
...
...
@@ -1588,6 +1595,8 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
return
-
1
;
if
(
tsdbAddSubBlock
(
pHelper
,
&
compBlock
,
tblkIdx
,
rowsRead
)
<
0
)
return
-
1
;
tblkIdx
++
;
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
else
{
if
(
tsdbLoadBlockData
(
pHelper
,
pCompBlock
,
NULL
)
<
0
)
return
-
1
;
int
round
=
0
;
...
...
@@ -1608,6 +1617,8 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
round
++
;
tblkIdx
++
;
}
ASSERT
(
tblkIdx
==
0
||
(
tsdbNextIterKey
(
pCommitIter
->
pIter
)
<
0
||
tsdbNextIterKey
(
pCommitIter
->
pIter
)
>
blockAtIdx
(
pHelper
,
tblkIdx
-
1
)
->
keyLast
));
}
}
}
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
9f622f9a
...
...
@@ -188,8 +188,7 @@ TsdbQueryHandleT* tsdbQueryTables(TSDB_REPO_T* tsdb, STsdbQueryCond* pCond, STab
pQueryHandle
->
allocSize
=
0
;
if
(
tsdbInitReadHelper
(
&
pQueryHandle
->
rhelper
,
(
STsdbRepo
*
)
tsdb
)
!=
0
)
{
free
(
pQueryHandle
);
return
NULL
;
goto
out_of_memory
;
}
tsdbTakeMemSnapshot
(
pQueryHandle
->
pTsdb
,
&
pQueryHandle
->
mem
,
&
pQueryHandle
->
imem
);
...
...
@@ -199,20 +198,32 @@ TsdbQueryHandleT* tsdbQueryTables(TSDB_REPO_T* tsdb, STsdbQueryCond* pCond, STab
// allocate buffer in order to load data blocks from file
int32_t
numOfCols
=
pCond
->
numOfCols
;
pQueryHandle
->
statis
=
calloc
(
numOfCols
,
sizeof
(
SDataStatis
));
if
(
pQueryHandle
->
statis
==
NULL
)
{
goto
out_of_memory
;
}
pQueryHandle
->
pColumns
=
taosArrayInit
(
numOfCols
,
sizeof
(
SColumnInfoData
));
// todo: use list instead of array?
if
(
pQueryHandle
->
pColumns
==
NULL
)
{
goto
out_of_memory
;
}
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColumnInfoData
colInfo
=
{{
0
},
0
};
colInfo
.
info
=
pCond
->
colList
[
i
];
colInfo
.
pData
=
calloc
(
1
,
EXTRA_BYTES
+
pQueryHandle
->
outputCapacity
*
pCond
->
colList
[
i
].
bytes
);
if
(
colInfo
.
pData
==
NULL
)
{
goto
out_of_memory
;
}
taosArrayPush
(
pQueryHandle
->
pColumns
,
&
colInfo
);
pQueryHandle
->
statis
[
i
].
colId
=
colInfo
.
info
.
colId
;
}
pQueryHandle
->
pTableCheckInfo
=
taosArrayInit
(
groupList
->
numOfTables
,
sizeof
(
STableCheckInfo
));
if
(
pQueryHandle
->
pTableCheckInfo
==
NULL
)
{
goto
out_of_memory
;
}
STsdbMeta
*
pMeta
=
tsdbGetMeta
(
tsdb
);
assert
(
pMeta
!=
NULL
);
...
...
@@ -247,6 +258,11 @@ TsdbQueryHandleT* tsdbQueryTables(TSDB_REPO_T* tsdb, STsdbQueryCond* pCond, STab
tsdbInitCompBlockLoadInfo
(
&
pQueryHandle
->
compBlockLoadInfo
);
return
(
TsdbQueryHandleT
)
pQueryHandle
;
out_of_memory:
terrno
=
TSDB_CODE_TDB_OUT_OF_MEMORY
;
tsdbCleanupQueryHandle
(
pQueryHandle
);
return
NULL
;
}
TsdbQueryHandleT
tsdbQueryLastRow
(
TSDB_REPO_T
*
tsdb
,
STsdbQueryCond
*
pCond
,
STableGroupInfo
*
groupList
,
void
*
qinfo
)
{
...
...
@@ -2407,29 +2423,32 @@ void tsdbCleanupQueryHandle(TsdbQueryHandleT queryHandle) {
if
(
pQueryHandle
==
NULL
)
{
return
;
}
if
(
pQueryHandle
->
pTableCheckInfo
!=
NULL
)
{
size_t
size
=
taosArrayGetSize
(
pQueryHandle
->
pTableCheckInfo
);
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
STableCheckInfo
*
pTableCheckInfo
=
taosArrayGet
(
pQueryHandle
->
pTableCheckInfo
,
i
);
destroyTableMemIterator
(
pTableCheckInfo
);
if
(
pTableCheckInfo
->
pDataCols
!=
NULL
)
{
tfree
(
pTableCheckInfo
->
pDataCols
->
buf
);
}
size_t
size
=
taosArrayGetSize
(
pQueryHandle
->
pTableCheckInfo
);
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
STableCheckInfo
*
pTableCheckInfo
=
taosArrayGet
(
pQueryHandle
->
pTableCheckInfo
,
i
);
destroyTableMemIterator
(
pTableCheckInfo
);
if
(
pTableCheckInfo
->
pDataCols
!=
NULL
)
{
tfree
(
pTableCheckInfo
->
pDataCols
->
buf
);
tfree
(
pTableCheckInfo
->
pDataCols
);
tfree
(
pTableCheckInfo
->
pCompInfo
);
}
tfree
(
pTableCheckInfo
->
pDataCols
);
tfree
(
pTableCheckInfo
->
pCompInfo
);
taosArrayDestroy
(
pQueryHandle
->
pTableCheckInfo
);
}
taosArrayDestroy
(
pQueryHandle
->
pTableCheckInfo
);
size_t
cols
=
taosArrayGetSize
(
pQueryHandle
->
pColumns
);
for
(
int32_t
i
=
0
;
i
<
cols
;
++
i
)
{
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
i
);
tfree
(
pColInfo
->
pData
);
}
if
(
pQueryHandle
->
pColumns
!=
NULL
)
{
size_t
cols
=
taosArrayGetSize
(
pQueryHandle
->
pColumns
);
for
(
int32_t
i
=
0
;
i
<
cols
;
++
i
)
{
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
i
);
tfree
(
pColInfo
->
pData
);
}
taosArrayDestroy
(
pQueryHandle
->
pColumns
);
}
taosArrayDestroy
(
pQueryHandle
->
pColumns
);
taosArrayDestroy
(
pQueryHandle
->
defaultLoadColumn
);
tfree
(
pQueryHandle
->
pDataBlockInfo
);
tfree
(
pQueryHandle
->
statis
);
...
...
src/util/src/tconfig.c
浏览文件 @
9f622f9a
...
...
@@ -308,38 +308,47 @@ bool taosReadGlobalCfg() {
sprintf
(
fileName
,
"%s/taos.cfg"
,
configDir
);
FILE
*
fp
=
fopen
(
fileName
,
"r"
);
if
(
fp
==
NULL
)
{
struct
stat
s
;
if
(
stat
(
configDir
,
&
s
)
!=
0
||
(
!
S_ISREG
(
s
.
st_mode
)
&&
!
S_ISLNK
(
s
.
st_mode
)))
{
//return true to follow behavior before file support
return
true
;
}
fp
=
fopen
(
configDir
,
"r"
);
if
(
fp
==
NULL
)
{
return
false
;
}
}
size_t
len
=
1024
;
line
=
calloc
(
1
,
len
);
if
(
fp
!=
NULL
)
{
while
(
!
feof
(
fp
))
{
memset
(
line
,
0
,
len
);
option
=
value
=
NULL
;
olen
=
vlen
=
0
;
while
(
!
feof
(
fp
))
{
memset
(
line
,
0
,
len
);
getline
(
&
line
,
&
len
,
fp
);
line
[
len
-
1
]
=
0
;
paGetToken
(
line
,
&
option
,
&
olen
);
if
(
olen
==
0
)
continue
;
option
[
olen
]
=
0
;
option
=
value
=
NULL
;
olen
=
vlen
=
0
;
paGetToken
(
option
+
olen
+
1
,
&
value
,
&
vlen
);
if
(
vlen
==
0
)
continue
;
value
[
vlen
]
=
0
;
getline
(
&
line
,
&
len
,
fp
);
line
[
len
-
1
]
=
0
;
paGetToken
(
line
,
&
option
,
&
olen
);
if
(
olen
==
0
)
continue
;
option
[
olen
]
=
0
;
// For dataDir, the format is:
// dataDir /mnt/disk1 0
paGetToken
(
value
+
vlen
+
1
,
&
value1
,
&
vlen1
);
taosReadConfigOption
(
option
,
value
);
}
paGetToken
(
option
+
olen
+
1
,
&
value
,
&
vlen
);
if
(
vlen
==
0
)
continue
;
value
[
vlen
]
=
0
;
fclose
(
fp
);
// For dataDir, the format is:
// dataDir /mnt/disk1 0
paGetToken
(
value
+
vlen
+
1
,
&
value1
,
&
vlen1
);
taosReadConfigOption
(
option
,
value
);
}
fclose
(
fp
);
tfree
(
line
);
return
true
;
...
...
tests/pytest/test.py
浏览文件 @
9f622f9a
...
...
@@ -96,7 +96,7 @@ if __name__ == "__main__":
processID
=
subprocess
.
check_output
(
usePortPID
,
shell
=
True
)
if
processID
:
killCmd
=
"kill -
9
%s"
%
processID
killCmd
=
"kill -
TERM
%s"
%
processID
os
.
system
(
killCmd
)
fuserCmd
=
"fuser -k -n tcp %d"
%
port
os
.
system
(
fuserCmd
)
...
...
tests/script/general/alter/dnode.sim
0 → 100644
浏览文件 @
9f622f9a
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ======== step1
sql alter dnode 1 resetlog
sql alter dnode 1 monitor 1
sleep 5000
sql select * from log.dn
if $rows <= 0 then
return -1
endi
print ======== step2
sql alter dnode 1 resetquerycache
sql alter dnode 1 debugFlag 135
sql alter dnode 1 debugFlag 131
sql alter dnode 1 monitor 0
sql alter dnode 1 debugFlag 135
sql alter dnode 1 monitorDebugFlag 135
sql alter dnode 1 vDebugFlag 135
sql alter dnode 1 mDebugFlag 135
sql alter dnode 1 cDebugFlag 135
sql alter dnode 1 httpDebugFlag 135
sql alter dnode 1 qDebugflag 135
sql alter dnode 1 sdbDebugFlag 135
sql alter dnode 1 uDebugFlag 135
sql alter dnode 1 tsdbDebugFlag 135
sql alter dnode 1 sDebugflag 135
sql alter dnode 1 rpcDebugFlag 135
sql alter dnode 1 dDebugFlag 135
sql alter dnode 1 mqttDebugFlag 135
sql alter dnode 1 wDebugFlag 135
sql alter dnode 1 tmrDebugFlag 135
sql_error alter dnode 2 wDebugFlag 135
sql_error alter dnode 2 tmrDebugFlag 135
print ======== step3
sql_error alter $hostname1 debugFlag 135
sql_error alter $hostname1 monitorDebugFlag 135
sql_error alter $hostname1 vDebugFlag 135
sql_error alter $hostname1 mDebugFlag 135
sql_error alter dnode $hostname2 debugFlag 135
sql_error alter dnode $hostname2 monitorDebugFlag 135
sql_error alter dnode $hostname2 vDebugFlag 135
sql_error alter dnode $hostname2 mDebugFlag 135
sql alter dnode $hostname1 debugFlag 135
sql alter dnode $hostname1 monitorDebugFlag 135
sql alter dnode $hostname1 vDebugFlag 135
sql alter dnode $hostname1 tmrDebugFlag 131
print ======== step4
sql_error sql alter dnode 1 balance 0
sql_error sql alter dnode 1 balance vnode:1-dnode:1
sql_error sql alter dnode 1 balance "vnode:1"
sql_error sql alter dnode 1 balance "vnode:1-dnode:1"
sql_error sql alter dnode 1 balance "dnode:1-vnode:1"
sql_error sql alter dnode 1 balance "dnode:1-"
sql_error sql alter dnode 1 balance "vnode:2-dnod"
sql alter dnode 1 balance "vnode:2-dnode:1" -x step4
step4:
print ======= over
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
tests/script/general/parser/stream_on_sys.sim
浏览文件 @
9f622f9a
...
...
@@ -28,7 +28,7 @@ sql create table diskstrm as select count(*), avg(disk_used), last(disk_used), a
sql create table bandstrm as select count(*), avg(band_speed), last(band_speed) from log.dn1 interval(4s) sliding(2s)
sql create table reqstrm as select count(*), avg(req_http), last(req_http), avg(req_select), last(req_select), avg(req_insert), last(req_insert) from log.dn1 interval(4s) sliding(2s)
sql create table iostrm as select count(*), avg(io_read), last(io_read), avg(io_write), last(io_write) from log.dn1 interval(4s) sliding(2s)
sleep 20000
sleep
1
20000
sql select * from cpustrm
if $rows <= 0 then
return -1
...
...
tests/script/jenkins/basic.txt
浏览文件 @
9f622f9a
...
...
@@ -3,6 +3,7 @@ cd ../../../debug; make
./test.sh -f general/alter/cached_schema_after_alter.sim
./test.sh -f general/alter/count.sim
./test.sh -f general/alter/dnode.sim
./test.sh -f general/alter/import.sim
./test.sh -f general/alter/insert1.sim
./test.sh -f general/alter/insert2.sim
...
...
@@ -308,13 +309,10 @@ cd ../../../debug; make
./test.sh -f unique/vnode/replica3_repeat.sim
./test.sh -f unique/vnode/replica3_vgroup.sim
# stream still has bugs
#./test.sh -f general/parser/stream_on_sys.sim
#./test.sh -f general/parser/repeatStream.sim
#./test.sh -f general/stream/metrics_del.sim
./test.sh -f general/parser/stream_on_sys.sim
./test.sh -f general/stream/metrics_del.sim
./test.sh -f general/stream/metrics_n.sim
#
./test.sh -f general/stream/metrics_replica1_vnoden.sim
./test.sh -f general/stream/metrics_replica1_vnoden.sim
./test.sh -f general/stream/restart_stream.sim
./test.sh -f general/stream/stream_3.sim
./test.sh -f general/stream/stream_restart.sim
...
...
@@ -326,13 +324,12 @@ cd ../../../debug; make
./test.sh -f unique/arbitrator/check_cluster_cfg_para.sim
#./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim
./test.sh -f unique/arbitrator/dn3_mn1_full_createTableFail.sim
./test.sh -f unique/arbitrator/dn3_mn1_full_dropDnodeFail.sim
./test.sh -f unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
./test.sh -f unique/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
#
./test.sh -f unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica_change.sim
./test.sh -f unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
#
./test.sh -f unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
# lower the priority while file corruption
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_change.sim
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
...
...
tests/script/sh/deploy.sh
浏览文件 @
9f622f9a
...
...
@@ -125,7 +125,7 @@ echo "mqttDebugFlag 135" >> $TAOS_CFG
echo
"qdebugFlag 135"
>>
$TAOS_CFG
echo
"rpcDebugFlag 135"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
echo
"udebugFlag 1
43
"
>>
$TAOS_CFG
echo
"udebugFlag 1
35
"
>>
$TAOS_CFG
echo
"sdebugFlag 135"
>>
$TAOS_CFG
echo
"wdebugFlag 135"
>>
$TAOS_CFG
echo
"monitor 0"
>>
$TAOS_CFG
...
...
tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
浏览文件 @
9f622f9a
...
...
@@ -137,8 +137,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
5
_2
$dnode2Vtatus = $data
7
_2
if $dnode3Vtatus != offline then
sleep 2000
...
...
@@ -204,8 +204,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
5
_2
$dnode2Vtatus = $data
7
_2
print dnode2Vtatus: $dnode3Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
@@ -319,8 +319,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
5
_2
$dnode2Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
浏览文件 @
9f622f9a
...
...
@@ -139,8 +139,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
@@ -206,8 +206,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
@@ -325,8 +325,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
@@ -386,8 +386,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
浏览文件 @
9f622f9a
...
...
@@ -358,10 +358,10 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4 $data10_4
#print $data0_5 $data1_5 $data2_5 $data3_5 $data4_5
#print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
$thirdDnode_2 = $data
10
_1
$thirdDnode_3 = $data
10
_2
$thirdDnode_4 = $data
10
_3
$thirdDnode_5 = $data
10
_4
$thirdDnode_2 = $data
8
_1
$thirdDnode_3 = $data
8
_2
$thirdDnode_4 = $data
8
_3
$thirdDnode_5 = $data
8
_4
if $thirdDnode_2 != null then
sleep 2000
...
...
@@ -405,10 +405,10 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4
#print $data0_5 $data1_5 $data2_5 $data3_5 $data4_5
#print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
$sencodDnode_2 = $data
7
_1
$sencodDnode_3 = $data
7
_2
$sencodDnode_4 = $data
7
_3
$sencodDnode_5 = $data
7
_4
$sencodDnode_2 = $data
6
_1
$sencodDnode_3 = $data
6
_2
$sencodDnode_4 = $data
6
_3
$sencodDnode_5 = $data
6
_4
if $sencodDnode_2 != null then
sleep 2000
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
浏览文件 @
9f622f9a
...
...
@@ -138,8 +138,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
@@ -213,8 +213,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
@@ -287,8 +287,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
浏览文件 @
9f622f9a
...
...
@@ -144,8 +144,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
5
_2
$dnode2Vtatus = $data
7
_2
if $dnode3Vtatus != offline then
sleep 2000
...
...
@@ -234,8 +234,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode2Vtatus != master then
sleep 2000
...
...
@@ -313,8 +313,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != offline then
sleep 2000
...
...
@@ -393,8 +393,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus == offline then
sleep 2000
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
浏览文件 @
9f622f9a
...
...
@@ -196,8 +196,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != offline then
sleep 2000
...
...
@@ -269,8 +269,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != offline then
sleep 2000
...
...
@@ -325,8 +325,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != slave then
sleep 2000
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
浏览文件 @
9f622f9a
...
...
@@ -158,8 +158,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != offline then
sleep 2000
...
...
@@ -231,8 +231,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != offline then
sleep 2000
...
...
@@ -287,8 +287,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != slave then
sleep 2000
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim
浏览文件 @
9f622f9a
...
...
@@ -141,8 +141,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
@@ -201,8 +201,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
@@ -301,8 +301,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
@@ -417,8 +417,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
浏览文件 @
9f622f9a
...
...
@@ -144,8 +144,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
5
_2
$dnode2Vtatus = $data
7
_2
if $dnode3Vtatus != offline then
sleep 2000
...
...
@@ -234,8 +234,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != master then
sleep 2000
...
...
@@ -313,8 +313,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus != offline then
sleep 2000
...
...
@@ -392,8 +392,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode2Vtatus = $data
9
_2
$dnode3Vtatus = $data
6
_2
$dnode2Vtatus = $data
7
_2
$dnode3Vtatus = $data
5
_2
if $dnode2Vtatus == offline then
sleep 2000
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
浏览文件 @
9f622f9a
...
...
@@ -151,8 +151,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
@@ -259,8 +259,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data
6
_3
$dnode2Vtatus = $data
9
_3
$dnode3Vtatus = $data
5
_3
$dnode2Vtatus = $data
7
_3
if $dnode3Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim
浏览文件 @
9f622f9a
...
...
@@ -139,8 +139,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica2_createTable_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica3_createTable_online.sim
浏览文件 @
9f622f9a
...
...
@@ -144,8 +144,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica2_dropDb.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica2_dropTable.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica3_createTable.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim
浏览文件 @
9f622f9a
...
...
@@ -139,8 +139,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
@@ -207,8 +207,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != slave then
sleep 2000
...
...
@@ -240,8 +240,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != master then
sleep 2000
...
...
@@ -314,8 +314,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != slave then
sleep 2000
...
...
@@ -347,8 +347,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != master then
sleep 2000
...
...
@@ -437,8 +437,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != slave then
sleep 2000
...
...
@@ -470,8 +470,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != master then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica3_dropDb.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/arbitrator/sync_replica3_dropTable.sim
浏览文件 @
9f622f9a
...
...
@@ -143,8 +143,8 @@ print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data
6
_2
$dnode3Vtatus = $data
9
_2
$dnode4Vtatus = $data
5
_2
$dnode3Vtatus = $data
7
_2
if $dnode4Vtatus != offline then
sleep 2000
...
...
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
浏览文件 @
9f622f9a
...
...
@@ -194,13 +194,13 @@ print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $dat
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
$d2v2status = $data
6
_4
$d2v3status = $data
6
_2
$d2v4status = $data
6
_3
$d2v2status = $data
5
_4
$d2v3status = $data
5
_2
$d2v4status = $data
5
_3
$d1v2status = $data
9
_4
$d1v3status = $data
9
_2
$d1v4status = $data
9
_3
$d1v2status = $data
7
_4
$d1v3status = $data
7
_2
$d1v4status = $data
7
_3
if $d2v2status != master then
sleep 2000
...
...
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
浏览文件 @
9f622f9a
...
...
@@ -196,13 +196,13 @@ print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $dat
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
$d2v2status = $data
6
_4
$d2v3status = $data
6
_2
$d2v4status = $data
6
_3
$d2v2status = $data
5
_4
$d2v3status = $data
5
_2
$d2v4status = $data
5
_3
$d1v2status = $data
9
_4
$d1v3status = $data
9
_2
$d1v4status = $data
9
_3
$d1v2status = $data
7
_4
$d1v3status = $data
7
_2
$d1v4status = $data
7
_3
if $d2v2status != master then
sleep 2000
...
...
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
浏览文件 @
9f622f9a
...
...
@@ -161,13 +161,13 @@ print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $dat
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
$d2v2status = $data
6
_4
$d2v3status = $data
6
_2
$d2v4status = $data
6
_3
$d2v2status = $data
5
_4
$d2v3status = $data
5
_2
$d2v4status = $data
5
_3
$d1v2status = $data
9
_4
$d1v3status = $data
9
_2
$d1v4status = $data
9
_3
$d1v2status = $data
7
_4
$d1v3status = $data
7
_2
$d1v4status = $data
7
_3
if $d2v2status != master then
sleep 2000
...
...
tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
浏览文件 @
9f622f9a
...
...
@@ -194,13 +194,13 @@ print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $dat
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
$d2v2status = $data
6
_4
$d2v3status = $data
6
_2
$d2v4status = $data
6
_3
$d2v2status = $data
5
_4
$d2v3status = $data
5
_2
$d2v4status = $data
5
_3
$d1v2status = $data
9
_4
$d1v3status = $data
9
_2
$d1v4status = $data
9
_3
$d1v2status = $data
7
_4
$d1v3status = $data
7
_2
$d1v4status = $data
7
_3
if $d2v2status != master then
sleep 2000
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录