Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
ae14d3ab
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看板
提交
ae14d3ab
编写于
7月 03, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
scripts
上级
5d30120a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
100 addition
and
70 deletion
+100
-70
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+2
-0
tests/script/general/db/alter_option.sim
tests/script/general/db/alter_option.sim
+4
-9
tests/script/general/db/alter_tables_d2.sim
tests/script/general/db/alter_tables_d2.sim
+37
-15
tests/script/general/db/alter_tables_v1.sim
tests/script/general/db/alter_tables_v1.sim
+23
-14
tests/script/general/db/alter_tables_v4.sim
tests/script/general/db/alter_tables_v4.sim
+23
-16
tests/script/general/db/alter_vgroups.sim
tests/script/general/db/alter_vgroups.sim
+5
-5
tests/script/general/db/basic.sim
tests/script/general/db/basic.sim
+4
-11
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+2
-0
未找到文件。
src/mnode/src/mnodeVgroup.c
浏览文件 @
ae14d3ab
...
...
@@ -408,6 +408,8 @@ int32_t mnodeGetAvailableVgroup(SMnodeMsg *pMsg, SVgObj **ppVgroup, int32_t *pSi
}
SVgObj
*
pVgroup
=
pDb
->
vgList
[
0
];
if
(
pVgroup
==
NULL
)
return
TSDB_CODE_MND_NO_ENOUGH_DNODES
;
int32_t
code
=
mnodeAllocVgroupIdPool
(
pVgroup
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
pthread_mutex_unlock
(
&
pDb
->
mutex
);
...
...
tests/script/general/db/alter_option.sim
浏览文件 @
ae14d3ab
...
...
@@ -2,7 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c max
t
ablesPerVnode -v 1000
system sh/cfg.sh -n dnode1 -c max
T
ablesPerVnode -v 1000
system sh/exec.sh -n dnode1 -s start
...
...
@@ -10,7 +10,7 @@ sleep 3000
sql connect
print ============================ dnode1 start
sql create database db
maxTables 500
cache 2 blocks 4 days 10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
sql create database db cache 2 blocks 4 days 10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
if $data00 != db then
...
...
@@ -31,13 +31,10 @@ endi
if $data06 != 20,20,20 then
return -1
endi
if $data07 !=
500
then
if $data07 !=
2
then
return -1
endi
if $data08 != 2 then
return -1
endi
if $data09 != 4 then
if $data08 != 4 then
return -1
endi
...
...
@@ -46,7 +43,6 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
return
sql_error alter database db cache 256
sql_error alter database db blocks 1
sql_error alter database db maxTables 10
sql_error alter database db days 10
sql_error alter database db keep 10
sql_error alter database db minRows 350
...
...
@@ -59,7 +55,6 @@ sql_error alter database db replica 2
print ============== step3
sql alter database db maxTables 1000
sql alter database db comp 1
sql alter database db blocks 40
sql alter database db keep 30
...
...
tests/script/general/db/alter_tables_d2.sim
浏览文件 @
ae14d3ab
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/cfg.sh -n dnode1 -c numOfTotalVnodes -v 2
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 4
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 5
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 2
system sh/cfg.sh -n dnode2 -c maxVgroupsPerDb -v 4
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 5
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
...
...
@@ -17,7 +19,7 @@ sleep 1000
print ============================ step1
sql create database db
maxTables 5
sql create database db
sql create table db.st (ts timestamp, i int) tags(t int)
sql create table db.t000 using db.st tags(0)
sql create table db.t001 using db.st tags(1)
...
...
@@ -74,9 +76,14 @@ if $rows != 20 then
endi
print ============================ step3
sql alter database db maxTables 10
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 10
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 10
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
sql create table db.t100 using db.st tags(0)
sql create table db.t101 using db.st tags(1)
...
...
@@ -133,9 +140,14 @@ if $rows != 40 then
endi
print ============================ step5
sql alter database db maxTables 15
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 15
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 15
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
sql create table db.t200 using db.st tags(0)
sql create table db.t201 using db.st tags(1)
...
...
@@ -252,9 +264,14 @@ if $rows != 60 then
endi
print ============================ step9
sql alter database db maxTables 20
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 20
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 20
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
sql create table db.t300 using db.st tags(0)
sql create table db.t301 using db.st tags(1)
...
...
@@ -380,9 +397,14 @@ if $rows != 80 then
endi
print ============================ step9
sql alter database db maxTables 25
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 25
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 25
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
sql create table db.t400 using db.st tags(0)
sql create table db.t401 using db.st tags(1)
...
...
tests/script/general/db/alter_tables_v1.sim
浏览文件 @
ae14d3ab
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c
numOfTotalVnodes
-v 1
system sh/cfg.sh -n dnode1 -c max
tablesPerVnode -v 100
0
system sh/cfg.sh -n dnode1 -c
maxVgroupsPerDb
-v 1
system sh/cfg.sh -n dnode1 -c max
TablesPerVnode -v 1
0
system sh/exec.sh -n dnode1 -s start
...
...
@@ -11,7 +11,7 @@ sql connect
print ============================ step1
sql create database db
maxTables 10
sql create database db
sql create table db.st (ts timestamp, i int) tags(t int)
sql create table db.t0 using db.st tags(0)
sql create table db.t1 using db.st tags(1)
...
...
@@ -49,8 +49,11 @@ endi
print ============================ step3
sql alter database db maxTables 20
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 20
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t10 using db.st tags(0)
sql create table db.t11 using db.st tags(1)
...
...
@@ -86,9 +89,11 @@ if $rows != 20 then
endi
print ============================ step5
sql alter database db maxTables 30
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 30
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t20 using db.st tags(0)
sql create table db.t21 using db.st tags(1)
...
...
@@ -183,9 +188,11 @@ if $rows != 30 then
endi
print ============================ step9
sql alter database db maxTables 40
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 40
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t30 using db.st tags(0)
sql create table db.t31 using db.st tags(1)
...
...
@@ -285,9 +292,11 @@ if $rows != 40 then
endi
print ============================ step12
sql alter database db maxTables 50
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 50
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t40 using db.st tags(0)
sql create table db.t41 using db.st tags(1)
...
...
tests/script/general/db/alter_tables_v4.sim
浏览文件 @
ae14d3ab
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c
numOfTotalVnodes
-v 4
system sh/cfg.sh -n dnode1 -c max
tablesPerVnode -v 1000
system sh/cfg.sh -n dnode1 -c
maxVgroupsPerDb
-v 4
system sh/cfg.sh -n dnode1 -c max
TablesPerVnode -v 5
system sh/exec.sh -n dnode1 -s start
...
...
@@ -11,7 +11,7 @@ sql connect
print ============================ step1
sql create database db
maxTables 5
sql create database db
sql create table db.st (ts timestamp, i int) tags(t int)
sql create table db.t000 using db.st tags(0)
sql create table db.t001 using db.st tags(1)
...
...
@@ -68,9 +68,11 @@ if $rows != 20 then
endi
print ============================ step3
sql alter database db maxTables 10
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 10
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t100 using db.st tags(0)
sql create table db.t101 using db.st tags(1)
...
...
@@ -127,9 +129,11 @@ if $rows != 40 then
endi
print ============================ step5
sql alter database db maxTables 15
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 15
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t200 using db.st tags(0)
sql create table db.t201 using db.st tags(1)
...
...
@@ -244,9 +248,11 @@ if $rows != 60 then
endi
print ============================ step9
sql alter database db maxTables 20
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 20
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t300 using db.st tags(0)
sql create table db.t301 using db.st tags(1)
...
...
@@ -370,10 +376,11 @@ if $rows != 80 then
endi
print ============================ step12
sql alter database db maxTables 25
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 25
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
sql create table db.t400 using db.st tags(0)
sql create table db.t401 using db.st tags(1)
sql create table db.t402 using db.st tags(2)
...
...
tests/script/general/db/alter_vgroups.sim
浏览文件 @
ae14d3ab
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c
numOfTotalVnodes
-v 1
system sh/cfg.sh -n dnode1 -c max
tablesPerVnode -v 100
0
system sh/cfg.sh -n dnode1 -c
maxVgroupsPerDb
-v 1
system sh/cfg.sh -n dnode1 -c max
TablesPerVnode -v 2
0
system sh/exec.sh -n dnode1 -s start
...
...
@@ -11,7 +11,7 @@ sql connect
print ============================ step1
sql create database db
maxTables 20
sql create database db
sql create table db.st (ts timestamp, i int) tags(t int)
sql create table db.t000 using db.st tags(0)
sql create table db.t001 using db.st tags(1)
...
...
@@ -69,7 +69,7 @@ endi
print ============================ step3
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c
numOfTotalVnodes
-v 2
system sh/cfg.sh -n dnode1 -c
maxVgroupsPerDb
-v 2
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
...
...
@@ -131,7 +131,7 @@ endi
print ============================ step5
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c
numOfTotalVnodes
-v 3
system sh/cfg.sh -n dnode1 -c
maxVgroupsPerDb
-v 3
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
...
...
tests/script/general/db/basic.sim
浏览文件 @
ae14d3ab
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c
numOfTotalVnodes
-v 4
system sh/cfg.sh -n dnode1 -c max
t
ablesPerVnode -v 1000
system sh/cfg.sh -n dnode1 -c
maxVgroupsPerDb
-v 4
system sh/cfg.sh -n dnode1 -c max
T
ablesPerVnode -v 1000
system sh/exec.sh -n dnode1 -s start
...
...
@@ -17,7 +17,7 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
print =============== step1
sql create database $db replica 1 days 20 keep 2000
sql create database $db replica 1 days 20 keep 2000
cache 16
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
if $data00 != $db then
...
...
@@ -35,7 +35,7 @@ endi
if $data05 != 20 then
return -1
endi
if $data07 != 1
000
then
if $data07 != 1
6
then
return -1
endi
...
...
@@ -76,13 +76,6 @@ if $data05 != 15 then
return -1
endi
#if $data06 != 1500,15000,1500 then
# return -1
#endi
if $data07 != 1000 then
return -1
endi
print =============== step6
sql use $db
sql create table $tb (ts timestamp, speed int)
...
...
tests/script/sh/deploy.sh
浏览文件 @
ae14d3ab
...
...
@@ -137,6 +137,8 @@ echo "mnodeEqualVnodeNum 0" >> $TAOS_CFG
echo
"clog 2"
>>
$TAOS_CFG
echo
"statusInterval 1"
>>
$TAOS_CFG
echo
"numOfTotalVnodes 4"
>>
$TAOS_CFG
echo
"maxVgroupsPerDb 4"
>>
$TAOS_CFG
echo
"maxTablesPerVnode 1000"
>>
$TAOS_CFG
echo
"asyncLog 0"
>>
$TAOS_CFG
echo
"numOfMnodes 1"
>>
$TAOS_CFG
echo
"locale en_US.UTF-8"
>>
$TAOS_CFG
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录