Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_46246346
TDengine
提交
3d089318
TDengine
项目概览
weixin_46246346
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3d089318
编写于
7月 18, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/query
上级
ae57aaae
7183b232
变更
157
展开全部
隐藏空白更改
内联
并排
Showing
157 changed file
with
1289 addition
and
915 deletion
+1289
-915
importSampleData/app/main.go
importSampleData/app/main.go
+122
-126
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+0
-2
src/common/src/tglobal.c
src/common/src/tglobal.c
+15
-25
src/connector/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNode.java
...or/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNode.java
+0
-1
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+0
-1
src/inc/taosdef.h
src/inc/taosdef.h
+2
-3
src/inc/taosmsg.h
src/inc/taosmsg.h
+2
-2
src/inc/tsdb.h
src/inc/tsdb.h
+0
-1
src/mnode/inc/mnodeDef.h
src/mnode/inc/mnodeDef.h
+3
-3
src/mnode/src/mnodeBalance.c
src/mnode/src/mnodeBalance.c
+2
-2
src/mnode/src/mnodeDnode.c
src/mnode/src/mnodeDnode.c
+25
-11
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+6
-5
src/plugins/monitor/src/monitorMain.c
src/plugins/monitor/src/monitorMain.c
+4
-0
src/tsdb/src/tsdbMemTable.c
src/tsdb/src/tsdbMemTable.c
+6
-1
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+1
-1
src/tsdb/src/tsdbRWHelper.c
src/tsdb/src/tsdbRWHelper.c
+20
-9
src/tsdb/tests/tsdbTests.cpp
src/tsdb/tests/tsdbTests.cpp
+9
-6
src/util/src/tutil.c
src/util/src/tutil.c
+4
-1
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+0
-2
tests/perftest-scripts/tdengineTestQ1Loop.sh
tests/perftest-scripts/tdengineTestQ1Loop.sh
+127
-0
tests/perftest-scripts/tdengineTestQ2Loop.sh
tests/perftest-scripts/tdengineTestQ2Loop.sh
+348
-0
tests/perftest-scripts/tdengineTestQ3Loop.sh
tests/perftest-scripts/tdengineTestQ3Loop.sh
+124
-0
tests/perftest-scripts/tdengineTestQ4Loop.sh
tests/perftest-scripts/tdengineTestQ4Loop.sh
+124
-0
tests/perftest-scripts/tdengineTestWriteLoop.sh
tests/perftest-scripts/tdengineTestWriteLoop.sh
+113
-0
tests/pytest/tag_lite/add.py
tests/pytest/tag_lite/add.py
+2
-0
tests/pytest/util/dnodes-no-random-fail.py
tests/pytest/util/dnodes-no-random-fail.py
+0
-1
tests/pytest/util/dnodes-random-fail.py
tests/pytest/util/dnodes-random-fail.py
+0
-1
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+0
-1
tests/script/general/alter/cached_schema_after_alter.sim
tests/script/general/alter/cached_schema_after_alter.sim
+2
-2
tests/script/general/db/alter_option.sim
tests/script/general/db/alter_option.sim
+0
-1
tests/script/general/db/basic.sim
tests/script/general/db/basic.sim
+1
-3
tests/script/general/db/delete.sim
tests/script/general/db/delete.sim
+0
-1
tests/script/general/db/delete_reuse1.sim
tests/script/general/db/delete_reuse1.sim
+0
-5
tests/script/general/db/delete_reuse2.sim
tests/script/general/db/delete_reuse2.sim
+0
-5
tests/script/general/db/delete_reusevnode.sim
tests/script/general/db/delete_reusevnode.sim
+0
-7
tests/script/general/db/delete_reusevnode2.sim
tests/script/general/db/delete_reusevnode2.sim
+0
-3
tests/script/general/db/delete_writing1.sim
tests/script/general/db/delete_writing1.sim
+0
-5
tests/script/general/db/delete_writing2.sim
tests/script/general/db/delete_writing2.sim
+0
-1
tests/script/general/db/len.sim
tests/script/general/db/len.sim
+0
-1
tests/script/general/db/repeat.sim
tests/script/general/db/repeat.sim
+0
-1
tests/script/general/db/vnodes.sim
tests/script/general/db/vnodes.sim
+0
-1
tests/script/general/parser/bug.sim
tests/script/general/parser/bug.sim
+0
-1
tests/script/general/parser/select_across_vnodes.sim
tests/script/general/parser/select_across_vnodes.sim
+0
-1
tests/script/general/parser/select_from_cache_disk.sim
tests/script/general/parser/select_from_cache_disk.sim
+0
-1
tests/script/general/parser/slimit.sim
tests/script/general/parser/slimit.sim
+0
-1
tests/script/general/parser/slimit1.sim
tests/script/general/parser/slimit1.sim
+0
-1
tests/script/general/parser/slimit_alter_tags.sim
tests/script/general/parser/slimit_alter_tags.sim
+0
-1
tests/script/general/parser/timestamp.sim
tests/script/general/parser/timestamp.sim
+0
-1
tests/script/general/stable/disk.sim
tests/script/general/stable/disk.sim
+0
-1
tests/script/general/stable/dnode3.sim
tests/script/general/stable/dnode3.sim
+0
-4
tests/script/general/stable/metrics.sim
tests/script/general/stable/metrics.sim
+0
-1
tests/script/general/stable/refcount.sim
tests/script/general/stable/refcount.sim
+0
-1
tests/script/general/stable/show.sim
tests/script/general/stable/show.sim
+0
-1
tests/script/general/stable/values.sim
tests/script/general/stable/values.sim
+0
-1
tests/script/general/stable/vnode3.sim
tests/script/general/stable/vnode3.sim
+0
-2
tests/script/general/stream/metrics_replica1_vnoden.sim
tests/script/general/stream/metrics_replica1_vnoden.sim
+0
-1
tests/script/general/stream/table_replica1_vnoden.sim
tests/script/general/stream/table_replica1_vnoden.sim
+0
-1
tests/script/general/table/delete_reuse1.sim
tests/script/general/table/delete_reuse1.sim
+0
-5
tests/script/general/table/delete_reuse2.sim
tests/script/general/table/delete_reuse2.sim
+0
-5
tests/script/general/table/delete_writing.sim
tests/script/general/table/delete_writing.sim
+0
-5
tests/script/general/table/limit.sim
tests/script/general/table/limit.sim
+0
-1
tests/script/general/table/vgroup.sim
tests/script/general/table/vgroup.sim
+1
-8
tests/script/sh/clear.sh
tests/script/sh/clear.sh
+0
-1
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+0
-1
tests/script/tmp/http.sim
tests/script/tmp/http.sim
+0
-5
tests/script/tmp/mnodes.sim
tests/script/tmp/mnodes.sim
+0
-4
tests/script/unique/account/authority.sim
tests/script/unique/account/authority.sim
+0
-1
tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim
tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_full_createTableFail.sim
...script/unique/arbitrator/dn3_mn1_full_createTableFail.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_full_dropDnodeFail.sim
...s/script/unique/arbitrator/dn3_mn1_full_dropDnodeFail.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
...script/unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
...e/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
...t/unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
+6
-13
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
...ipt/unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
tests/script/unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
+5
-10
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
...t/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
...pt/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
.../unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
...unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
+4
-9
tests/script/unique/arbitrator/dn3_mn2_killDnode.sim
tests/script/unique/arbitrator/dn3_mn2_killDnode.sim
+4
-9
tests/script/unique/arbitrator/insert_duplicationTs.sim
tests/script/unique/arbitrator/insert_duplicationTs.sim
+4
-9
tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim
.../unique/arbitrator/offline_replica2_alterTable_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim
...pt/unique/arbitrator/offline_replica2_alterTag_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica2_createTable_online.sim
...unique/arbitrator/offline_replica2_createTable_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim
...ript/unique/arbitrator/offline_replica2_dropDb_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim
...t/unique/arbitrator/offline_replica2_dropTable_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim
.../unique/arbitrator/offline_replica3_alterTable_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim
...pt/unique/arbitrator/offline_replica3_alterTag_online.sim
+4
-4
tests/script/unique/arbitrator/offline_replica3_createTable_online.sim
...unique/arbitrator/offline_replica3_createTable_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim
...ript/unique/arbitrator/offline_replica3_dropDb_online.sim
+4
-9
tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim
...t/unique/arbitrator/offline_replica3_dropTable_online.sim
+4
-9
tests/script/unique/arbitrator/replica_changeWithArbitrator.sim
...script/unique/arbitrator/replica_changeWithArbitrator.sim
+6
-11
tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim
...script/unique/arbitrator/sync_replica2_alterTable_add.sim
+4
-9
tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim
...cript/unique/arbitrator/sync_replica2_alterTable_drop.sim
+4
-9
tests/script/unique/arbitrator/sync_replica2_dropDb.sim
tests/script/unique/arbitrator/sync_replica2_dropDb.sim
+4
-9
tests/script/unique/arbitrator/sync_replica2_dropTable.sim
tests/script/unique/arbitrator/sync_replica2_dropTable.sim
+4
-9
tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim
...script/unique/arbitrator/sync_replica3_alterTable_add.sim
+4
-9
tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim
...cript/unique/arbitrator/sync_replica3_alterTable_drop.sim
+4
-9
tests/script/unique/arbitrator/sync_replica3_createTable.sim
tests/script/unique/arbitrator/sync_replica3_createTable.sim
+4
-9
tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim
...ator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim
+4
-9
tests/script/unique/arbitrator/sync_replica3_dropDb.sim
tests/script/unique/arbitrator/sync_replica3_dropDb.sim
+4
-9
tests/script/unique/arbitrator/sync_replica3_dropTable.sim
tests/script/unique/arbitrator/sync_replica3_dropTable.sim
+4
-9
tests/script/unique/big/balance.sim
tests/script/unique/big/balance.sim
+0
-5
tests/script/unique/big/maxvnodes.sim
tests/script/unique/big/maxvnodes.sim
+0
-2
tests/script/unique/big/restartSpeed.sim
tests/script/unique/big/restartSpeed.sim
+0
-2
tests/script/unique/cluster/balance1.sim
tests/script/unique/cluster/balance1.sim
+0
-9
tests/script/unique/cluster/balance2.sim
tests/script/unique/cluster/balance2.sim
+0
-9
tests/script/unique/cluster/balance3.sim
tests/script/unique/cluster/balance3.sim
+0
-9
tests/script/unique/cluster/client1_0.sim
tests/script/unique/cluster/client1_0.sim
+0
-5
tests/script/unique/cluster/cluster_main.sim
tests/script/unique/cluster/cluster_main.sim
+5
-11
tests/script/unique/cluster/cluster_main0.sim
tests/script/unique/cluster/cluster_main0.sim
+5
-11
tests/script/unique/cluster/cluster_main1.sim
tests/script/unique/cluster/cluster_main1.sim
+5
-11
tests/script/unique/cluster/cluster_main2.sim
tests/script/unique/cluster/cluster_main2.sim
+5
-11
tests/script/unique/cluster/main1_client1_0.sim
tests/script/unique/cluster/main1_client1_0.sim
+1
-2
tests/script/unique/cluster/main2_client1_0.sim
tests/script/unique/cluster/main2_client1_0.sim
+0
-1
tests/script/unique/db/delete.sim
tests/script/unique/db/delete.sim
+0
-3
tests/script/unique/db/delete_part.sim
tests/script/unique/db/delete_part.sim
+4
-9
tests/script/unique/db/replica_add12.sim
tests/script/unique/db/replica_add12.sim
+0
-5
tests/script/unique/db/replica_add13.sim
tests/script/unique/db/replica_add13.sim
+0
-5
tests/script/unique/db/replica_add23.sim
tests/script/unique/db/replica_add23.sim
+0
-5
tests/script/unique/db/replica_part.sim
tests/script/unique/db/replica_part.sim
+0
-3
tests/script/unique/db/replica_reduce21.sim
tests/script/unique/db/replica_reduce21.sim
+0
-6
tests/script/unique/db/replica_reduce31.sim
tests/script/unique/db/replica_reduce31.sim
+0
-3
tests/script/unique/db/replica_reduce32.sim
tests/script/unique/db/replica_reduce32.sim
+0
-3
tests/script/unique/dnode/alternativeRole.sim
tests/script/unique/dnode/alternativeRole.sim
+3
-3
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
+4
-9
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
...s/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
+4
-9
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
...migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
+4
-9
tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
+4
-9
tests/script/unique/stable/balance_replica1.sim
tests/script/unique/stable/balance_replica1.sim
+0
-2
tests/script/unique/stable/dnode2.sim
tests/script/unique/stable/dnode2.sim
+0
-2
tests/script/unique/stable/dnode2_stop.sim
tests/script/unique/stable/dnode2_stop.sim
+0
-2
tests/script/unique/stable/dnode3.sim
tests/script/unique/stable/dnode3.sim
+0
-3
tests/script/unique/stable/replica2_dnode4.sim
tests/script/unique/stable/replica2_dnode4.sim
+0
-4
tests/script/unique/stable/replica2_vnode3.sim
tests/script/unique/stable/replica2_vnode3.sim
+0
-2
tests/script/unique/stable/replica3_dnode6.sim
tests/script/unique/stable/replica3_dnode6.sim
+0
-7
tests/script/unique/stable/replica3_vnode3.sim
tests/script/unique/stable/replica3_vnode3.sim
+0
-4
tests/script/unique/stream/metrics_balance.sim
tests/script/unique/stream/metrics_balance.sim
+0
-2
tests/script/unique/stream/metrics_replica1_dnode2.sim
tests/script/unique/stream/metrics_replica1_dnode2.sim
+0
-2
tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim
...s/script/unique/stream/metrics_replica2_dnode2_vnoden.sim
+0
-2
tests/script/unique/stream/metrics_replica2_dnode3.sim
tests/script/unique/stream/metrics_replica2_dnode3.sim
+0
-3
tests/script/unique/stream/metrics_replica3_dnode4.sim
tests/script/unique/stream/metrics_replica3_dnode4.sim
+0
-4
tests/script/unique/stream/table_balance.sim
tests/script/unique/stream/table_balance.sim
+0
-4
tests/script/unique/stream/table_move.sim
tests/script/unique/stream/table_move.sim
+0
-10
tests/script/unique/stream/table_replica1_dnode2.sim
tests/script/unique/stream/table_replica1_dnode2.sim
+0
-4
tests/script/unique/stream/table_replica2_dnode2_vnoden.sim
tests/script/unique/stream/table_replica2_dnode2_vnoden.sim
+0
-2
tests/script/unique/stream/table_replica2_dnode3.sim
tests/script/unique/stream/table_replica2_dnode3.sim
+0
-3
tests/script/unique/stream/table_replica3_dnode4.sim
tests/script/unique/stream/table_replica3_dnode4.sim
+0
-4
tests/script/unique/vnode/many.sim
tests/script/unique/vnode/many.sim
+0
-4
tests/script/unique/vnode/replica2_basic2.sim
tests/script/unique/vnode/replica2_basic2.sim
+0
-5
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+13
-3
未找到文件。
importSampleData/app/main.go
浏览文件 @
3d089318
...
...
@@ -7,7 +7,6 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/taosdata/TDengine/importSampleData/import"
"hash/crc32"
"io"
"log"
...
...
@@ -18,88 +17,89 @@ import (
"sync"
"time"
dataimport
"github.com/taosdata/TDengine/importSampleData/import"
_
"github.com/taosdata/driver-go/taosSql"
)
const
(
TIMESTAMP
=
"timestamp"
DATETIME
=
"datetime"
MILLISECOND
=
"millisecond"
DEFAULT_STARTTIME
int64
=
-
1
DEFAULT_INTERVAL
int64
=
1
*
1000
DEFAULT_DELAY
int64
=
-
1
DEFAULT_STATISTIC_TABLE
=
"statistic"
JSON_FORMAT
=
"json"
CSV_FORMAT
=
"csv"
TIMESTAMP
=
"timestamp"
DATETIME
=
"datetime"
MILLISECOND
=
"millisecond"
DEFAULT_STARTTIME
int64
=
-
1
DEFAULT_INTERVAL
int64
=
1
*
1000
DEFAULT_DELAY
int64
=
-
1
DEFAULT_STATISTIC_TABLE
=
"statistic"
JSON_FORMAT
=
"json"
CSV_FORMAT
=
"csv"
SUPERTABLE_PREFIX
=
"s_"
SUBTABLE_PREFIX
=
"t_"
SUBTABLE_PREFIX
=
"t_"
DRIVER_NAME
=
"taosSql"
DRIVER_NAME
=
"taosSql"
STARTTIME_LAYOUT
=
"2006-01-02 15:04:05.000"
INSERT_PREFIX
=
"insert into "
INSERT_PREFIX
=
"insert into "
)
var
(
cfg
string
cases
string
hnum
int
vnum
int
thread
int
batch
int
auto
int
starttimestr
string
interval
int64
host
string
port
int
user
string
password
string
dropdb
int
db
string
dbparam
string
cfg
string
cases
string
hnum
int
vnum
int
thread
int
batch
int
auto
int
starttimestr
string
interval
int64
host
string
port
int
user
string
password
string
dropdb
int
db
string
dbparam
string
dataSourceName
string
startTime
int64
startTime
int64
superTableConfigMap
=
make
(
map
[
string
]
*
superTableConfig
)
subTableMap
=
make
(
map
[
string
]
*
dataRows
)
scaleTableNames
[]
string
superTableConfigMap
=
make
(
map
[
string
]
*
superTableConfig
)
subTableMap
=
make
(
map
[
string
]
*
dataRows
)
scaleTableNames
[]
string
scaleTableMap
=
make
(
map
[
string
]
*
scaleTableInfo
)
successRows
[]
int64
successRows
[]
int64
lastStaticTime
time
.
Time
lastTotalRows
int64
timeTicker
*
time
.
Ticker
delay
int64
// default 10 milliseconds
tick
int64
save
int
saveTable
string
lastTotalRows
int64
timeTicker
*
time
.
Ticker
delay
int64
// default 10 milliseconds
tick
int64
save
int
saveTable
string
)
type
superTableConfig
struct
{
startTime
int64
endTime
int64
cycleTime
int64
startTime
int64
endTime
int64
cycleTime
int64
avgInterval
int64
config
dataimport
.
CaseConfig
config
dataimport
.
CaseConfig
}
type
scaleTableInfo
struct
{
scaleTableName
string
subTableName
string
insertRows
int64
subTableName
string
insertRows
int64
}
type
tableRows
struct
{
tableName
string
// tableName
value
string
// values(...)
tableName
string
// tableName
value
string
// values(...)
}
type
dataRows
struct
{
rows
[]
map
[
string
]
interface
{}
config
dataimport
.
CaseConfig
rows
[]
map
[
string
]
interface
{}
config
dataimport
.
CaseConfig
}
func
(
rows
dataRows
)
Len
()
int
{
...
...
@@ -127,10 +127,10 @@ func init() {
if
db
==
""
{
//db = "go"
db
=
fmt
.
Sprintf
(
"test_%s"
,
time
.
Now
()
.
Format
(
"20060102"
))
db
=
fmt
.
Sprintf
(
"test_%s"
,
time
.
Now
()
.
Format
(
"20060102"
))
}
if
auto
==
1
&&
len
(
starttimestr
)
==
0
{
if
auto
==
1
&&
len
(
starttimestr
)
==
0
{
log
.
Fatalf
(
"startTime must be set when auto is 1, the format is
\"
yyyy-MM-dd HH:mm:ss.SSS
\"
"
)
}
...
...
@@ -141,7 +141,7 @@ func init() {
}
startTime
=
t
.
UnixNano
()
/
1e6
// as millisecond
}
else
{
}
else
{
startTime
=
DEFAULT_STARTTIME
}
...
...
@@ -179,7 +179,7 @@ func main() {
_
,
exists
:=
superTableConfigMap
[
caseConfig
.
Stname
]
if
!
exists
{
superTableConfigMap
[
caseConfig
.
Stname
]
=
&
superTableConfig
{
config
:
caseConfig
}
superTableConfigMap
[
caseConfig
.
Stname
]
=
&
superTableConfig
{
config
:
caseConfig
}
}
else
{
log
.
Fatalf
(
"the stname of case %s already exist.
\n
"
,
caseConfig
.
Stname
)
}
...
...
@@ -201,9 +201,9 @@ func main() {
if
DEFAULT_DELAY
==
delay
{
// default delay
delay
=
caseMinumInterval
/
2
delay
=
caseMinumInterval
/
2
if
delay
<
1
{
delay
=
1
delay
=
1
}
log
.
Printf
(
"actual delay is %d ms."
,
delay
)
}
...
...
@@ -232,7 +232,7 @@ func main() {
filePerThread
:=
subTableNum
/
thread
leftFileNum
:=
subTableNum
%
thread
var
wg
sync
.
WaitGroup
var
wg
sync
.
WaitGroup
start
=
time
.
Now
()
...
...
@@ -255,31 +255,31 @@ func main() {
go
staticSpeed
()
wg
.
Wait
()
usedTime
:=
time
.
Since
(
start
)
usedTime
:=
time
.
Since
(
start
)
total
:=
getTotalRows
(
successRows
)
log
.
Printf
(
"finished insert %d rows, used %d ms, speed %d rows/s"
,
total
,
usedTime
/
1e6
,
total
*
1e9
/
int64
(
usedTime
))
log
.
Printf
(
"finished insert %d rows, used %d ms, speed %d rows/s"
,
total
,
usedTime
/
1e6
,
total
*
1e3
/
usedTime
.
Milliseconds
(
))
if
vnum
==
0
{
// continue waiting for insert data
wait
:=
make
(
chan
string
)
v
:=
<-
wait
wait
:=
make
(
chan
string
)
v
:=
<-
wait
log
.
Printf
(
"program receive %s, exited.
\n
"
,
v
)
}
else
{
}
else
{
timeTicker
.
Stop
()
}
}
func
staticSpeed
(){
func
staticSpeed
()
{
connection
:=
getConnection
()
defer
connection
.
Close
()
if
save
==
1
{
connection
.
Exec
(
"use "
+
db
)
_
,
err
:=
connection
.
Exec
(
"create table if not exists "
+
saveTable
+
"(ts timestamp, speed int)"
)
_
,
err
:=
connection
.
Exec
(
"create table if not exists "
+
saveTable
+
"(ts timestamp, speed int)"
)
if
err
!=
nil
{
log
.
Fatalf
(
"create %s Table error: %s
\n
"
,
saveTable
,
err
)
}
...
...
@@ -287,13 +287,13 @@ func staticSpeed(){
for
{
<-
timeTicker
.
C
currentTime
:=
time
.
Now
()
usedTime
:=
currentTime
.
UnixNano
()
-
lastStaticTime
.
UnixNano
()
total
:=
getTotalRows
(
successRows
)
currentSuccessRows
:=
total
-
lastTotalRows
speed
:=
currentSuccessRows
*
1e9
/
int64
(
usedTime
)
log
.
Printf
(
"insert %d rows, used %d ms, speed %d rows/s"
,
currentSuccessRows
,
usedTime
/
1e6
,
speed
)
...
...
@@ -301,14 +301,14 @@ func staticSpeed(){
insertSql
:=
fmt
.
Sprintf
(
"insert into %s values(%d, %d)"
,
saveTable
,
currentTime
.
UnixNano
()
/
1e6
,
speed
)
connection
.
Exec
(
insertSql
)
}
lastStaticTime
=
currentTime
lastTotalRows
=
total
}
}
func
getTotalRows
(
successRows
[]
int64
)
int64
{
func
getTotalRows
(
successRows
[]
int64
)
int64
{
var
total
int64
=
0
for
j
:=
0
;
j
<
len
(
successRows
);
j
++
{
total
+=
successRows
[
j
]
...
...
@@ -316,18 +316,18 @@ func getTotalRows(successRows []int64) int64{
return
total
}
func
getSuperTableTimeConfig
(
fileRows
dataRows
)
(
start
,
cycleTime
,
avgInterval
int64
){
func
getSuperTableTimeConfig
(
fileRows
dataRows
)
(
start
,
cycleTime
,
avgInterval
int64
)
{
if
auto
==
1
{
// use auto generate data time
start
=
startTime
avgInterval
=
interval
maxTableRows
:=
normalizationDataWithSameInterval
(
fileRows
,
avgInterval
)
cycleTime
=
maxTableRows
*
avgInterval
+
avgInterval
cycleTime
=
maxTableRows
*
avgInterval
+
avgInterval
}
else
{
// use the sample data primary timestamp
sort
.
Sort
(
fileRows
)
// sort the file data by the primarykey
sort
.
Sort
(
fileRows
)
// sort the file data by the primarykey
minTime
:=
getPrimaryKey
(
fileRows
.
rows
[
0
][
fileRows
.
config
.
Timestamp
])
maxTime
:=
getPrimaryKey
(
fileRows
.
rows
[
len
(
fileRows
.
rows
)
-
1
][
fileRows
.
config
.
Timestamp
])
...
...
@@ -340,21 +340,21 @@ func getSuperTableTimeConfig(fileRows dataRows) (start, cycleTime, avgInterval i
if
minTime
==
maxTime
{
avgInterval
=
interval
cycleTime
=
tableNum
*
avgInterval
+
avgInterval
}
else
{
cycleTime
=
tableNum
*
avgInterval
+
avgInterval
}
else
{
avgInterval
=
(
maxTime
-
minTime
)
/
int64
(
len
(
fileRows
.
rows
))
*
tableNum
cycleTime
=
maxTime
-
minTime
+
avgInterval
}
}
return
}
func
createStatisticTable
(){
func
createStatisticTable
()
{
connection
:=
getConnection
()
defer
connection
.
Close
()
_
,
err
:=
connection
.
Exec
(
"create table if not exist "
+
db
+
"."
+
saveTable
+
"(ts timestamp, speed int)"
)
_
,
err
:=
connection
.
Exec
(
"create table if not exist "
+
db
+
"."
+
saveTable
+
"(ts timestamp, speed int)"
)
if
err
!=
nil
{
log
.
Fatalf
(
"createStatisticTable error: %s
\n
"
,
err
)
}
...
...
@@ -379,8 +379,8 @@ func createSubTable(subTableMaps map[string]*dataRows) {
tableName
:=
getScaleSubTableName
(
subTableName
,
i
)
scaleTableMap
[
tableName
]
=
&
scaleTableInfo
{
subTableName
:
subTableName
,
insertRows
:
0
,
subTableName
:
subTableName
,
insertRows
:
0
,
}
scaleTableNames
=
append
(
scaleTableNames
,
tableName
)
...
...
@@ -389,12 +389,12 @@ func createSubTable(subTableMaps map[string]*dataRows) {
buffers
.
WriteString
(
" using "
)
buffers
.
WriteString
(
superTableName
)
buffers
.
WriteString
(
" tags("
)
for
_
,
tag
:=
range
subTableMaps
[
subTableName
]
.
config
.
Tags
{
for
_
,
tag
:=
range
subTableMaps
[
subTableName
]
.
config
.
Tags
{
tagValue
:=
fmt
.
Sprintf
(
"%v"
,
tagValues
[
strings
.
ToLower
(
tag
.
Name
)])
buffers
.
WriteString
(
"'"
+
tagValue
+
"'"
)
buffers
.
WriteString
(
","
)
}
buffers
.
Truncate
(
buffers
.
Len
()
-
1
)
buffers
.
Truncate
(
buffers
.
Len
()
-
1
)
buffers
.
WriteString
(
")"
)
createTableSql
:=
buffers
.
String
()
...
...
@@ -451,14 +451,14 @@ func createSuperTable(superTableConfigMap map[string]*superTableConfig) {
buffer
.
WriteString
(
field
.
Name
+
" "
+
field
.
Type
+
","
)
}
buffer
.
Truncate
(
buffer
.
Len
()
-
1
)
buffer
.
Truncate
(
buffer
.
Len
()
-
1
)
buffer
.
WriteString
(
") tags( "
)
for
_
,
tag
:=
range
superTableConf
.
config
.
Tags
{
buffer
.
WriteString
(
tag
.
Name
+
" "
+
tag
.
Type
+
","
)
}
buffer
.
Truncate
(
buffer
.
Len
()
-
1
)
buffer
.
Truncate
(
buffer
.
Len
()
-
1
)
buffer
.
WriteString
(
")"
)
createSql
:=
buffer
.
String
()
...
...
@@ -475,16 +475,15 @@ func createSuperTable(superTableConfigMap map[string]*superTableConfig) {
func
getScaleSubTableName
(
subTableName
string
,
hnum
int
)
string
{
if
hnum
==
0
{
return
subTableName
return
subTableName
}
return
fmt
.
Sprintf
(
"%s_%d"
,
subTableName
,
hnum
)
return
fmt
.
Sprintf
(
"%s_%d"
,
subTableName
,
hnum
)
}
func
getSuperTableName
(
stname
string
)
string
{
return
SUPERTABLE_PREFIX
+
stname
}
/**
* normalizationData , and return the num of subTables
*/
...
...
@@ -505,12 +504,12 @@ func normalizationData(fileRows dataRows, minTime int64) int64 {
value
,
ok
:=
subTableMap
[
subTableName
]
if
!
ok
{
subTableMap
[
subTableName
]
=
&
dataRows
{
rows
:
[]
map
[
string
]
interface
{}{
row
},
config
:
fileRows
.
config
,
rows
:
[]
map
[
string
]
interface
{}{
row
},
config
:
fileRows
.
config
,
}
tableNum
++
}
else
{
}
else
{
value
.
rows
=
append
(
value
.
rows
,
row
)
}
}
...
...
@@ -518,9 +517,9 @@ func normalizationData(fileRows dataRows, minTime int64) int64 {
}
// return the maximum table rows
func
normalizationDataWithSameInterval
(
fileRows
dataRows
,
avgInterval
int64
)
int64
{
func
normalizationDataWithSameInterval
(
fileRows
dataRows
,
avgInterval
int64
)
int64
{
// subTableMap
currSubTableMap
:=
make
(
map
[
string
]
*
dataRows
)
currSubTableMap
:=
make
(
map
[
string
]
*
dataRows
)
for
_
,
row
:=
range
fileRows
.
rows
{
// get subTableName
tableValue
:=
getSubTableNameValue
(
row
[
fileRows
.
config
.
SubTableName
])
...
...
@@ -534,10 +533,10 @@ func normalizationDataWithSameInterval(fileRows dataRows, avgInterval int64) int
if
!
ok
{
row
[
fileRows
.
config
.
Timestamp
]
=
0
currSubTableMap
[
subTableName
]
=
&
dataRows
{
rows
:
[]
map
[
string
]
interface
{}{
row
},
config
:
fileRows
.
config
,
rows
:
[]
map
[
string
]
interface
{}{
row
},
config
:
fileRows
.
config
,
}
}
else
{
}
else
{
row
[
fileRows
.
config
.
Timestamp
]
=
int64
(
len
(
value
.
rows
))
*
avgInterval
value
.
rows
=
append
(
value
.
rows
,
row
)
}
...
...
@@ -545,7 +544,7 @@ func normalizationDataWithSameInterval(fileRows dataRows, avgInterval int64) int
}
var
maxRows
,
tableRows
int
=
0
,
0
for
tableName
:=
range
currSubTableMap
{
for
tableName
:=
range
currSubTableMap
{
tableRows
=
len
(
currSubTableMap
[
tableName
]
.
rows
)
subTableMap
[
tableName
]
=
currSubTableMap
[
tableName
]
// add to global subTableMap
if
tableRows
>
maxRows
{
...
...
@@ -556,13 +555,11 @@ func normalizationDataWithSameInterval(fileRows dataRows, avgInterval int64) int
return
int64
(
maxRows
)
}
func
getSubTableName
(
subTableValue
string
,
superTableName
string
)
string
{
func
getSubTableName
(
subTableValue
string
,
superTableName
string
)
string
{
return
SUBTABLE_PREFIX
+
subTableValue
+
"_"
+
superTableName
}
func
insertData
(
threadIndex
,
start
,
end
int
,
wg
*
sync
.
WaitGroup
,
successRows
[]
int64
)
{
func
insertData
(
threadIndex
,
start
,
end
int
,
wg
*
sync
.
WaitGroup
,
successRows
[]
int64
)
{
connection
:=
getConnection
()
defer
connection
.
Close
()
defer
wg
.
Done
()
...
...
@@ -591,9 +588,9 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
var
tableEndTime
int64
if
vnum
==
0
{
// need continue generate data
tableEndTime
=
time
.
Now
()
.
UnixNano
()
/
1e6
}
else
{
tableEndTime
=
tableStartTime
+
superTableConf
.
cycleTime
*
int64
(
vnum
)
-
superTableConf
.
avgInterval
tableEndTime
=
time
.
Now
()
.
UnixNano
()
/
1e6
}
else
{
tableEndTime
=
tableStartTime
+
superTableConf
.
cycleTime
*
int64
(
vnum
)
-
superTableConf
.
avgInterval
}
insertRows
:=
scaleTableMap
[
tableName
]
.
insertRows
...
...
@@ -603,10 +600,10 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
rowIndex
:=
insertRows
%
subTableRows
currentRow
:=
subTableInfo
.
rows
[
rowIndex
]
currentTime
:=
getPrimaryKey
(
currentRow
[
subTableInfo
.
config
.
Timestamp
])
+
loopNum
*
superTableConf
.
cycleTime
+
tableStartTime
currentTime
:=
getPrimaryKey
(
currentRow
[
subTableInfo
.
config
.
Timestamp
])
+
loopNum
*
superTableConf
.
cycleTime
+
tableStartTime
if
currentTime
<=
tableEndTime
{
// append
if
lastTableName
!=
tableName
{
buffers
.
WriteString
(
tableName
)
buffers
.
WriteString
(
" values"
)
...
...
@@ -616,22 +613,22 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
buffers
.
WriteString
(
"("
)
buffers
.
WriteString
(
fmt
.
Sprintf
(
"%v"
,
currentTime
))
buffers
.
WriteString
(
","
)
// fieldNum := len(subTableInfo.config.Fields)
for
_
,
field
:=
range
subTableInfo
.
config
.
Fields
{
for
_
,
field
:=
range
subTableInfo
.
config
.
Fields
{
buffers
.
WriteString
(
getFieldValue
(
currentRow
[
strings
.
ToLower
(
field
.
Name
)]))
buffers
.
WriteString
(
","
)
// if( i != fieldNum -1){
// }
}
buffers
.
Truncate
(
buffers
.
Len
()
-
1
)
buffers
.
Truncate
(
buffers
.
Len
()
-
1
)
buffers
.
WriteString
(
") "
)
appendRows
++
insertRows
++
if
appendRows
==
batch
{
if
appendRows
==
batch
{
// executebatch
insertSql
:=
buffers
.
String
()
connection
.
Exec
(
"use "
+
db
)
...
...
@@ -645,7 +642,7 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
lastTableName
=
""
appendRows
=
0
}
}
else
{
}
else
{
// finished insert current table
break
}
...
...
@@ -654,14 +651,14 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
scaleTableMap
[
tableName
]
.
insertRows
=
insertRows
}
// left := len(rows)
if
appendRows
>
0
{
if
appendRows
>
0
{
// executebatch
insertSql
:=
buffers
.
String
()
connection
.
Exec
(
"use "
+
db
)
affectedRows
:=
executeBatchInsert
(
insertSql
,
connection
)
successRows
[
threadIndex
]
+=
affectedRows
currSuccessRows
+=
affectedRows
...
...
@@ -676,7 +673,7 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
break
}
if
(
num
==
0
)
{
if
num
==
0
{
wg
.
Done
()
//finished insert history data
num
++
}
...
...
@@ -691,7 +688,7 @@ func insertData(threadIndex, start, end int, wg *sync.WaitGroup, successRows []
}
func
buildSql
(
rows
[]
tableRows
)
string
{
func
buildSql
(
rows
[]
tableRows
)
string
{
var
lastTableName
string
...
...
@@ -709,7 +706,7 @@ func buildSql(rows []tableRows) string{
if
lastTableName
==
row
.
tableName
{
buffers
.
WriteString
(
row
.
value
)
}
else
{
}
else
{
buffers
.
WriteString
(
" "
)
buffers
.
WriteString
(
row
.
tableName
)
buffers
.
WriteString
(
" values"
)
...
...
@@ -722,7 +719,7 @@ func buildSql(rows []tableRows) string{
return
inserSql
}
func
buildRow
(
tableName
string
,
currentTime
int64
,
subTableInfo
*
dataRows
,
currentRow
map
[
string
]
interface
{})
tableRows
{
func
buildRow
(
tableName
string
,
currentTime
int64
,
subTableInfo
*
dataRows
,
currentRow
map
[
string
]
interface
{})
tableRows
{
tableRows
:=
tableRows
{
tableName
:
tableName
}
...
...
@@ -732,12 +729,12 @@ func buildRow(tableName string, currentTime int64, subTableInfo *dataRows, curre
buffers
.
WriteString
(
fmt
.
Sprintf
(
"%v"
,
currentTime
))
buffers
.
WriteString
(
","
)
for
_
,
field
:=
range
subTableInfo
.
config
.
Fields
{
for
_
,
field
:=
range
subTableInfo
.
config
.
Fields
{
buffers
.
WriteString
(
getFieldValue
(
currentRow
[
strings
.
ToLower
(
field
.
Name
)]))
buffers
.
WriteString
(
","
)
}
buffers
.
Truncate
(
buffers
.
Len
()
-
1
)
buffers
.
Truncate
(
buffers
.
Len
()
-
1
)
buffers
.
WriteString
(
")"
)
insertSql
:=
buffers
.
String
()
...
...
@@ -764,7 +761,7 @@ func getFieldValue(fieldValue interface{}) string {
return
fmt
.
Sprintf
(
"'%v'"
,
fieldValue
)
}
func
getConnection
()
*
sql
.
DB
{
func
getConnection
()
*
sql
.
DB
{
db
,
err
:=
sql
.
Open
(
DRIVER_NAME
,
dataSourceName
)
if
err
!=
nil
{
panic
(
err
)
...
...
@@ -772,7 +769,6 @@ func getConnection() *sql.DB{
return
db
}
func
getSubTableNameValue
(
suffix
interface
{})
string
{
return
fmt
.
Sprintf
(
"%v"
,
suffix
)
}
...
...
@@ -950,7 +946,7 @@ func parseMillisecond(str interface{}, layout string) int64 {
log
.
Println
(
err
)
return
-
1
}
return
t
.
UnixNano
()
/
1e6
return
t
.
UnixNano
()
/
1e6
}
// lowerMapKey transfer all the map key to lowercase
...
...
@@ -1009,7 +1005,7 @@ func checkUserCaseConfig(caseName string, caseConfig *dataimport.CaseConfig) {
if
i
<
len
(
caseConfig
.
Fields
)
-
1
{
// delete middle item, a = a[:i+copy(a[i:], a[i+1:])]
caseConfig
.
Fields
=
caseConfig
.
Fields
[
:
i
+
copy
(
caseConfig
.
Fields
[
i
:
],
caseConfig
.
Fields
[
i
+
1
:
])]
}
else
{
}
else
{
// delete the last item
caseConfig
.
Fields
=
caseConfig
.
Fields
[
:
len
(
caseConfig
.
Fields
)
-
1
]
}
...
...
@@ -1057,7 +1053,7 @@ func parseArg() {
flag
.
Parse
()
}
func
printArg
()
{
func
printArg
()
{
fmt
.
Println
(
"used param: "
)
fmt
.
Println
(
"-cfg: "
,
cfg
)
fmt
.
Println
(
"-cases:"
,
cases
)
...
...
src/common/inc/tglobal.h
浏览文件 @
3d089318
...
...
@@ -30,8 +30,6 @@ extern uint16_t tsDnodeShellPort;
extern
uint16_t
tsDnodeDnodePort
;
extern
uint16_t
tsSyncPort
;
extern
int32_t
tsStatusInterval
;
extern
int16_t
tsNumOfVnodesPerCore
;
extern
int16_t
tsNumOfTotalVnodes
;
extern
int32_t
tsNumOfMnodes
;
extern
int32_t
tsEnableVnodeBak
;
...
...
src/common/src/tglobal.c
浏览文件 @
3d089318
...
...
@@ -38,12 +38,9 @@ uint16_t tsDnodeShellPort = 6030; // udp[6035-6039] tcp[6035]
uint16_t
tsDnodeDnodePort
=
6035
;
// udp/tcp
uint16_t
tsSyncPort
=
6040
;
int32_t
tsStatusInterval
=
1
;
// second
int16_t
tsNumOfVnodesPerCore
=
32
;
int16_t
tsNumOfTotalVnodes
=
TSDB_INVALID_VNODE_NUM
;
int32_t
tsNumOfMnodes
=
3
;
int32_t
tsEnableVnodeBak
=
1
;
// common
int32_t
tsRpcTimer
=
1000
;
int32_t
tsRpcMaxTime
=
600
;
// seconds;
...
...
@@ -199,6 +196,9 @@ int32_t sDebugFlag = 135;
int32_t
wDebugFlag
=
135
;
int32_t
tsdbDebugFlag
=
131
;
int32_t
(
*
monitorStartSystemFp
)()
=
NULL
;
void
(
*
monitorStopSystemFp
)()
=
NULL
;
static
pthread_once_t
tsInitGlobalCfgOnce
=
PTHREAD_ONCE_INIT
;
void
taosSetAllDebugFlag
()
{
...
...
@@ -248,11 +248,17 @@ bool taosCfgDynamicOptions(char *msg) {
*
((
int32_t
*
)
cfg
->
ptr
)
=
vint
;
if
(
strncasecmp
(
cfg
->
option
,
"monitor"
,
olen
)
==
0
)
{
// if (0 == vint) {
// monitorStartSystem();
// } else {
// monitorStopSystem();
// }
if
(
1
==
vint
)
{
if
(
monitorStartSystemFp
)
{
(
*
monitorStartSystemFp
)();
uInfo
(
"monitor is enabled"
);
}
}
else
{
if
(
monitorStopSystemFp
)
{
(
*
monitorStopSystemFp
)();
uInfo
(
"monitor is disabled"
);
}
}
return
true
;
}
...
...
@@ -393,16 +399,6 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"numOfTotalVnodes"
;
cfg
.
ptr
=
&
tsNumOfTotalVnodes
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT16
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
TSDB_MAX_VNODES
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"numOfMnodes"
;
cfg
.
ptr
=
&
tsNumOfMnodes
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
...
...
@@ -444,7 +440,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption
(
cfg
);
// 0-any; 1-mnode; 2-vnode
cfg
.
option
=
"
alternativeR
ole"
;
cfg
.
option
=
"
r
ole"
;
cfg
.
ptr
=
&
tsAlternativeRole
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
...
...
@@ -1271,12 +1267,6 @@ bool taosCheckGlobalCfg() {
tsNumOfCores
=
1
;
}
if
(
tsNumOfTotalVnodes
==
TSDB_INVALID_VNODE_NUM
)
{
tsNumOfTotalVnodes
=
tsNumOfCores
*
tsNumOfVnodesPerCore
;
tsNumOfTotalVnodes
=
tsNumOfTotalVnodes
>
TSDB_MAX_VNODES
?
TSDB_MAX_VNODES
:
tsNumOfTotalVnodes
;
tsNumOfTotalVnodes
=
tsNumOfTotalVnodes
<
TSDB_MIN_VNODES
?
TSDB_MIN_VNODES
:
tsNumOfTotalVnodes
;
}
// todo refactor
tsVersion
=
0
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/utils/TDNode.java
浏览文件 @
3d089318
...
...
@@ -208,7 +208,6 @@ public class TDNode {
setCfgConfig
(
"mnodeEqualVnodeNum"
,
"0"
);
setCfgConfig
(
"walLevel"
,
"1"
);
setCfgConfig
(
"statusInterval"
,
"1"
);
setCfgConfig
(
"numOfTotalVnodes"
,
"64"
);
setCfgConfig
(
"numOfMnodes"
,
"3"
);
setCfgConfig
(
"numOfThreadsPerCore"
,
"2.0"
);
setCfgConfig
(
"monitor"
,
"0"
);
...
...
src/dnode/src/dnodeMgmt.c
浏览文件 @
3d089318
...
...
@@ -699,7 +699,6 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
pStatus
->
dnodeId
=
htonl
(
tsDnodeCfg
.
dnodeId
);
strcpy
(
pStatus
->
dnodeEp
,
tsLocalEp
);
pStatus
->
lastReboot
=
htonl
(
tsRebootTime
);
pStatus
->
numOfTotalVnodes
=
htons
((
uint16_t
)
tsNumOfTotalVnodes
);
pStatus
->
numOfCores
=
htons
((
uint16_t
)
tsNumOfCores
);
pStatus
->
diskAvailable
=
tsAvailDataDirGB
;
pStatus
->
alternativeRole
=
(
uint8_t
)
tsAlternativeRole
;
...
...
src/inc/taosdef.h
浏览文件 @
3d089318
...
...
@@ -274,9 +274,8 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
#define TSDB_DEFAULT_PAYLOAD_SIZE 5120 // default payload size, greater than PATH_MAX value
#define TSDB_EXTRA_PAYLOAD_SIZE 128 // extra bytes for auth
#define TSDB_CQ_SQL_SIZE 1024
#define TSDB_MIN_VNODES 64
#define TSDB_MAX_VNODES 2048
#define TSDB_MIN_VNODES 256
#define TSDB_INVALID_VNODE_NUM 0
#define TSDB_DNODE_ROLE_ANY 0
#define TSDB_DNODE_ROLE_MGMT 1
...
...
@@ -293,7 +292,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
#define TSDB_MIN_TOTAL_BLOCKS 2
#define TSDB_MAX_TOTAL_BLOCKS 10000
#define TSDB_DEFAULT_TOTAL_BLOCKS
4
#define TSDB_DEFAULT_TOTAL_BLOCKS
6
#define TSDB_MIN_TABLES 4
#define TSDB_MAX_TABLES 10000000
...
...
src/inc/taosmsg.h
浏览文件 @
3d089318
...
...
@@ -581,12 +581,12 @@ typedef struct {
char
dnodeEp
[
TSDB_EP_LEN
];
uint32_t
moduleStatus
;
uint32_t
lastReboot
;
// time stamp for last reboot
uint16_t
numOfTotalVnodes
;
// from config file
uint16_t
reserve1
;
// from config file
uint16_t
openVnodes
;
uint16_t
numOfCores
;
float
diskAvailable
;
// GB
uint8_t
alternativeRole
;
uint8_t
reserve
[
15
];
uint8_t
reserve
2
[
15
];
SClusterCfg
clusterCfg
;
SVnodeLoad
load
[];
}
SDMStatusMsg
;
...
...
src/inc/tsdb.h
浏览文件 @
3d089318
...
...
@@ -46,7 +46,6 @@ typedef struct {
int
(
*
eventCallBack
)(
void
*
);
void
*
(
*
cqCreateFunc
)(
void
*
handle
,
uint64_t
uid
,
int
sid
,
char
*
sqlStr
,
STSchema
*
pSchema
);
void
(
*
cqDropFunc
)(
void
*
handle
);
void
*
(
*
configFunc
)(
int32_t
vgId
,
int32_t
sid
);
}
STsdbAppH
;
// --------- TSDB REPOSITORY CONFIGURATION DEFINITION
...
...
src/mnode/inc/mnodeDef.h
浏览文件 @
3d089318
...
...
@@ -40,7 +40,7 @@ typedef struct SDnodeObj {
int32_t
dnodeId
;
int32_t
openVnodes
;
int64_t
createdTime
;
int32_t
totalVnodes
;
// from dnode status msg, config information
int32_t
resever0
;
// from dnode status msg, config information
int32_t
customScore
;
// config by user
uint32_t
lastAccess
;
uint16_t
numOfCores
;
// from dnode status msg
...
...
@@ -50,7 +50,7 @@ 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
reserve
d0
[
14
];
int8_t
reserve
1
[
14
];
int8_t
updateEnd
[
1
];
int32_t
refCount
;
uint32_t
moduleStatus
;
...
...
@@ -61,7 +61,7 @@ typedef struct SDnodeObj {
int16_t
cpuAvgUsage
;
// calc from sys.cpu
int16_t
memoryAvgUsage
;
// calc from sys.mem
int16_t
bandwidthUsage
;
// calc from sys.band
int8_t
reserved
1
[
2
];
int8_t
reserved
2
[
2
];
}
SDnodeObj
;
typedef
struct
SMnodeObj
{
...
...
src/mnode/src/mnodeBalance.c
浏览文件 @
3d089318
...
...
@@ -39,11 +39,11 @@ int32_t balanceAllocVnodes(SVgObj *pVgroup) {
pIter
=
mnodeGetNextDnode
(
pIter
,
&
pDnode
);
if
(
pDnode
==
NULL
)
break
;
if
(
pDnode
->
totalVnodes
>
0
&&
pDnode
->
openVnodes
<
pDnode
->
totalVnodes
)
{
if
(
pDnode
->
numOfCores
>
0
&&
pDnode
->
openVnodes
<
TSDB_MAX_VNODES
)
{
float
openVnodes
=
pDnode
->
openVnodes
;
if
(
pDnode
->
isMgmt
)
openVnodes
+=
tsMnodeEqualVnodeNum
;
float
usage
=
openVnodes
/
pDnode
->
totalVnod
es
;
float
usage
=
openVnodes
/
pDnode
->
numOfCor
es
;
if
(
usage
<=
vnodeUsage
)
{
pSelDnode
=
pDnode
;
vnodeUsage
=
usage
;
...
...
src/mnode/src/mnodeDnode.c
浏览文件 @
3d089318
...
...
@@ -345,8 +345,7 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
pStatus
->
moduleStatus
=
htonl
(
pStatus
->
moduleStatus
);
pStatus
->
lastReboot
=
htonl
(
pStatus
->
lastReboot
);
pStatus
->
numOfCores
=
htons
(
pStatus
->
numOfCores
);
pStatus
->
numOfTotalVnodes
=
htons
(
pStatus
->
numOfTotalVnodes
);
uint32_t
version
=
htonl
(
pStatus
->
version
);
if
(
version
!=
tsVersion
)
{
mError
(
"status msg version:%d not equal with mnode:%d"
,
version
,
tsVersion
);
...
...
@@ -372,7 +371,6 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
pDnode
->
numOfCores
=
pStatus
->
numOfCores
;
pDnode
->
diskAvailable
=
pStatus
->
diskAvailable
;
pDnode
->
alternativeRole
=
pStatus
->
alternativeRole
;
pDnode
->
totalVnodes
=
pStatus
->
numOfTotalVnodes
;
pDnode
->
moduleStatus
=
pStatus
->
moduleStatus
;
if
(
pStatus
->
dnodeId
==
0
)
{
...
...
@@ -452,17 +450,29 @@ static int32_t mnodeCreateDnode(char *ep, SMnodeMsg *pMsg) {
return
grantCode
;
}
char
dnodeEp
[
TSDB_EP_LEN
]
=
{
0
};
tstrncpy
(
dnodeEp
,
ep
,
TSDB_EP_LEN
);
strtrim
(
dnodeEp
);
char
*
temp
=
strchr
(
dnodeEp
,
':'
);
if
(
!
temp
)
{
int
len
=
strlen
(
dnodeEp
);
if
(
dnodeEp
[
len
-
1
]
==
';'
)
dnodeEp
[
len
-
1
]
=
0
;
len
=
strlen
(
dnodeEp
);
snprintf
(
dnodeEp
+
len
,
TSDB_EP_LEN
-
len
,
":%d"
,
tsServerPort
);
}
ep
=
dnodeEp
;
SDnodeObj
*
pDnode
=
mnodeGetDnodeByEp
(
ep
);
if
(
pDnode
!=
NULL
)
{
mnodeDecDnodeRef
(
pDnode
);
mError
(
"dnode:%d is alredy exist, %s:%d"
,
pDnode
->
dnodeId
,
pDnode
->
dnodeFqdn
,
pDnode
->
dnodePort
);
mError
(
"dnode:%d is alre
a
dy exist, %s:%d"
,
pDnode
->
dnodeId
,
pDnode
->
dnodeFqdn
,
pDnode
->
dnodePort
);
return
TSDB_CODE_MND_DNODE_ALREADY_EXIST
;
}
pDnode
=
(
SDnodeObj
*
)
calloc
(
1
,
sizeof
(
SDnodeObj
));
pDnode
->
createdTime
=
taosGetTimestampMs
();
pDnode
->
status
=
TAOS_DN_STATUS_OFFLINE
;
pDnode
->
totalVnodes
=
TSDB_INVALID_VNODE_NUM
;
tstrncpy
(
pDnode
->
dnodeEp
,
ep
,
TSDB_EP_LEN
);
taosGetFqdnPortFromEp
(
ep
,
pDnode
->
dnodeFqdn
,
&
pDnode
->
dnodePort
);
...
...
@@ -507,8 +517,12 @@ int32_t mnodeDropDnode(SDnodeObj *pDnode, void *pMsg) {
static
int32_t
mnodeDropDnodeByEp
(
char
*
ep
,
SMnodeMsg
*
pMsg
)
{
SDnodeObj
*
pDnode
=
mnodeGetDnodeByEp
(
ep
);
if
(
pDnode
==
NULL
)
{
mError
(
"dnode:%s, is not exist"
,
ep
);
return
TSDB_CODE_MND_DNODE_NOT_EXIST
;
int32_t
dnodeId
=
(
int32_t
)
strtol
(
ep
,
NULL
,
10
);
pDnode
=
mnodeGetDnode
(
dnodeId
);
if
(
pDnode
==
NULL
)
{
mError
(
"dnode:%s, is not exist"
,
ep
);
return
TSDB_CODE_MND_DNODE_NOT_EXIST
;
}
}
if
(
strcmp
(
pDnode
->
dnodeEp
,
mnodeGetMnodeMasterEp
())
==
0
)
{
...
...
@@ -575,13 +589,13 @@ static int32_t mnodeGetDnodeMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pC
pShow
->
bytes
[
cols
]
=
2
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_SMALLINT
;
strcpy
(
pSchema
[
cols
].
name
,
"
open_
vnodes"
);
strcpy
(
pSchema
[
cols
].
name
,
"vnodes"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
2
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_SMALLINT
;
strcpy
(
pSchema
[
cols
].
name
,
"
total_vnod
es"
);
strcpy
(
pSchema
[
cols
].
name
,
"
cor
es"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
...
...
@@ -593,7 +607,7 @@ static int32_t mnodeGetDnodeMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pC
pShow
->
bytes
[
cols
]
=
6
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"
alternativeR
ole"
);
strcpy
(
pSchema
[
cols
].
name
,
"
r
ole"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
...
...
@@ -645,7 +659,7 @@ static int32_t mnodeRetrieveDnodes(SShowObj *pShow, char *data, int32_t rows, vo
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int16_t
*
)
pWrite
=
pDnode
->
totalVnod
es
;
*
(
int16_t
*
)
pWrite
=
pDnode
->
numOfCor
es
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
3d089318
...
...
@@ -585,9 +585,9 @@ static int32_t mnodeGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *p
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
4
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_
INT
;
strcpy
(
pSchema
[
cols
].
name
,
"
poolSize
"
);
pShow
->
bytes
[
cols
]
=
12
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_
BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"
status
"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
...
...
@@ -688,8 +688,9 @@ static int32_t mnodeRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, v
*
(
int32_t
*
)
pWrite
=
pVgroup
->
numOfTables
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int32_t
*
)
pWrite
=
taosIdPoolMaxSize
(
pVgroup
->
idPool
);
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
char
*
status
=
vgroupStatus
[
pVgroup
->
status
];
STR_TO_VARSTR
(
pWrite
,
status
);
cols
++
;
int32_t
onlineVnodes
=
0
;
...
...
src/plugins/monitor/src/monitorMain.c
浏览文件 @
3d089318
...
...
@@ -76,6 +76,8 @@ static void monitorInitDatabase();
static
void
monitorInitDatabaseCb
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
);
static
void
monitorStartTimer
();
static
void
monitorSaveSystemInfo
();
extern
int32_t
(
*
monitorStartSystemFp
)();
extern
void
(
*
monitorStopSystemFp
)();
static
void
monitorCheckDiskUsage
(
void
*
para
,
void
*
unused
)
{
taosGetDisk
();
...
...
@@ -85,6 +87,8 @@ static void monitorCheckDiskUsage(void *para, void *unused) {
int32_t
monitorInitSystem
()
{
taos_init
();
taosTmrReset
(
monitorCheckDiskUsage
,
CHECK_INTERVAL
,
NULL
,
tscTmr
,
&
tsMonitorConn
.
diskTimer
);
monitorStartSystemFp
=
monitorStartSystem
;
monitorStopSystemFp
=
monitorStopSystem
;
return
0
;
}
...
...
src/tsdb/src/tsdbMemTable.c
浏览文件 @
3d089318
...
...
@@ -172,7 +172,7 @@ void *tsdbAllocBytes(STsdbRepo *pRepo, int bytes) {
STsdbBufBlock
*
pBufBlock
=
tsdbGetCurrBufBlock
(
pRepo
);
if
(
pBufBlock
!=
NULL
&&
pBufBlock
->
remain
<
bytes
)
{
if
(
listNEles
(
pRepo
->
mem
->
bufBlockList
)
>=
pCfg
->
totalBlocks
/
2
)
{
// need to commit mem
if
(
listNEles
(
pRepo
->
mem
->
bufBlockList
)
>=
pCfg
->
totalBlocks
/
3
)
{
// need to commit mem
if
(
tsdbAsyncCommit
(
pRepo
)
<
0
)
return
NULL
;
}
else
{
if
(
tsdbLockRepo
(
pRepo
)
<
0
)
return
NULL
;
...
...
@@ -204,6 +204,9 @@ void *tsdbAllocBytes(STsdbRepo *pRepo, int bytes) {
pBufBlock
->
offset
+=
bytes
;
pBufBlock
->
remain
-=
bytes
;
tsdbTrace
(
"vgId:%d allocate %d bytes from buffer block, nBlocks %d offset %d remain %d"
,
REPO_ID
(
pRepo
),
bytes
,
listNEles
(
pRepo
->
mem
->
bufBlockList
),
pBufBlock
->
offset
,
pBufBlock
->
remain
);
return
ptr
;
}
...
...
@@ -324,6 +327,8 @@ static void tsdbFreeBytes(STsdbRepo *pRepo, void *ptr, int bytes) {
pBufBlock
->
offset
-=
bytes
;
pBufBlock
->
remain
+=
bytes
;
ASSERT
(
ptr
==
POINTER_SHIFT
(
pBufBlock
->
data
,
pBufBlock
->
offset
));
tsdbTrace
(
"vgId:%d return %d bytes to buffer block, nBlocks %d offset %d remain %d"
,
REPO_ID
(
pRepo
),
bytes
,
listNEles
(
pRepo
->
mem
->
bufBlockList
),
pBufBlock
->
offset
,
pBufBlock
->
remain
);
}
static
SMemTable
*
tsdbNewMemTable
(
STsdbCfg
*
pCfg
)
{
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
3d089318
...
...
@@ -592,7 +592,7 @@ void tsdbUpdateTableSchema(STsdbRepo *pRepo, STable *pTable, STSchema *pSchema,
int
tlen
=
tsdbGetTableEncodeSize
(
TSDB_UPDATE_META
,
pCTable
);
void
*
buf
=
tsdbAllocBytes
(
pRepo
,
tlen
);
ASSERT
(
buf
!=
NULL
);
tsdbInsertTableAct
(
pRepo
,
TSDB_UPDATE_META
,
buf
,
pTable
);
tsdbInsertTableAct
(
pRepo
,
TSDB_UPDATE_META
,
buf
,
p
C
Table
);
}
}
...
...
src/tsdb/src/tsdbRWHelper.c
浏览文件 @
3d089318
...
...
@@ -589,20 +589,25 @@ void tsdbGetDataStatis(SRWHelper *pHelper, SDataStatis *pStatis, int numOfCols)
int
tsdbLoadBlockDataCols
(
SRWHelper
*
pHelper
,
SCompBlock
*
pCompBlock
,
SCompInfo
*
pCompInfo
,
int16_t
*
colIds
,
int
numOfColIds
)
{
ASSERT
(
pCompBlock
->
numOfSubBlocks
>=
1
);
// Must be super block
SCompBlock
*
pTCompBlock
=
pCompBlock
;
int
numOfSubBlocks
=
pCompBlock
->
numOfSubBlocks
;
if
(
numOfSubBlocks
>
1
)
pCompBlock
=
(
SCompBlock
*
)
POINTER_SHIFT
((
pCompInfo
==
NULL
)
?
pHelper
->
pCompInfo
:
pCompInfo
,
pCompBlock
->
offset
);
p
T
CompBlock
=
(
SCompBlock
*
)
POINTER_SHIFT
((
pCompInfo
==
NULL
)
?
pHelper
->
pCompInfo
:
pCompInfo
,
pCompBlock
->
offset
);
tdResetDataCols
(
pHelper
->
pDataCols
[
0
]);
if
(
tsdbLoadBlockDataColsImpl
(
pHelper
,
pCompBlock
,
pHelper
->
pDataCols
[
0
],
colIds
,
numOfColIds
)
<
0
)
goto
_err
;
if
(
tsdbLoadBlockDataColsImpl
(
pHelper
,
p
T
CompBlock
,
pHelper
->
pDataCols
[
0
],
colIds
,
numOfColIds
)
<
0
)
goto
_err
;
for
(
int
i
=
1
;
i
<
numOfSubBlocks
;
i
++
)
{
tdResetDataCols
(
pHelper
->
pDataCols
[
1
]);
pCompBlock
++
;
if
(
tsdbLoadBlockDataColsImpl
(
pHelper
,
pCompBlock
,
pHelper
->
pDataCols
[
1
],
colIds
,
numOfColIds
)
<
0
)
goto
_err
;
p
T
CompBlock
++
;
if
(
tsdbLoadBlockDataColsImpl
(
pHelper
,
p
T
CompBlock
,
pHelper
->
pDataCols
[
1
],
colIds
,
numOfColIds
)
<
0
)
goto
_err
;
if
(
tdMergeDataCols
(
pHelper
->
pDataCols
[
0
],
pHelper
->
pDataCols
[
1
],
pHelper
->
pDataCols
[
1
]
->
numOfRows
)
<
0
)
goto
_err
;
}
ASSERT
(
pHelper
->
pDataCols
[
0
]
->
numOfRows
==
pCompBlock
->
numOfRows
&&
dataColsKeyFirst
(
pHelper
->
pDataCols
[
0
])
==
pCompBlock
->
keyFirst
&&
dataColsKeyLast
(
pHelper
->
pDataCols
[
0
])
==
pCompBlock
->
keyLast
);
return
0
;
_err:
...
...
@@ -610,19 +615,25 @@ _err:
}
int
tsdbLoadBlockData
(
SRWHelper
*
pHelper
,
SCompBlock
*
pCompBlock
,
SCompInfo
*
pCompInfo
)
{
SCompBlock
*
pTCompBlock
=
pCompBlock
;
int
numOfSubBlock
=
pCompBlock
->
numOfSubBlocks
;
if
(
numOfSubBlock
>
1
)
pCompBlock
=
(
SCompBlock
*
)
POINTER_SHIFT
((
pCompInfo
==
NULL
)
?
pHelper
->
pCompInfo
:
pCompInfo
,
pCompBlock
->
offset
);
p
T
CompBlock
=
(
SCompBlock
*
)
POINTER_SHIFT
((
pCompInfo
==
NULL
)
?
pHelper
->
pCompInfo
:
pCompInfo
,
pCompBlock
->
offset
);
tdResetDataCols
(
pHelper
->
pDataCols
[
0
]);
if
(
tsdbLoadBlockDataImpl
(
pHelper
,
pCompBlock
,
pHelper
->
pDataCols
[
0
])
<
0
)
goto
_err
;
if
(
tsdbLoadBlockDataImpl
(
pHelper
,
p
T
CompBlock
,
pHelper
->
pDataCols
[
0
])
<
0
)
goto
_err
;
for
(
int
i
=
1
;
i
<
numOfSubBlock
;
i
++
)
{
tdResetDataCols
(
pHelper
->
pDataCols
[
1
]);
pCompBlock
++
;
if
(
tsdbLoadBlockDataImpl
(
pHelper
,
pCompBlock
,
pHelper
->
pDataCols
[
1
])
<
0
)
goto
_err
;
p
T
CompBlock
++
;
if
(
tsdbLoadBlockDataImpl
(
pHelper
,
p
T
CompBlock
,
pHelper
->
pDataCols
[
1
])
<
0
)
goto
_err
;
if
(
tdMergeDataCols
(
pHelper
->
pDataCols
[
0
],
pHelper
->
pDataCols
[
1
],
pHelper
->
pDataCols
[
1
]
->
numOfRows
)
<
0
)
goto
_err
;
}
ASSERT
(
pHelper
->
pDataCols
[
0
]
->
numOfRows
==
pCompBlock
->
numOfRows
&&
dataColsKeyFirst
(
pHelper
->
pDataCols
[
0
])
==
pCompBlock
->
keyFirst
&&
dataColsKeyLast
(
pHelper
->
pDataCols
[
0
])
==
pCompBlock
->
keyLast
);
return
0
;
_err:
...
...
@@ -1227,7 +1238,6 @@ static int tsdbLoadBlockDataImpl(SRWHelper *pHelper, SCompBlock *pCompBlock, SDa
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
goto
_err
;
}
ASSERT
(
pCompData
->
numOfCols
==
pCompBlock
->
numOfCols
);
int32_t
tsize
=
TSDB_GET_COMPCOL_LEN
(
pCompBlock
->
numOfCols
);
if
(
!
taosCheckChecksumWhole
((
uint8_t
*
)
pCompData
,
tsize
))
{
...
...
@@ -1236,6 +1246,7 @@ static int tsdbLoadBlockDataImpl(SRWHelper *pHelper, SCompBlock *pCompBlock, SDa
terrno
=
TSDB_CODE_TDB_FILE_CORRUPTED
;
goto
_err
;
}
ASSERT
(
pCompData
->
numOfCols
==
pCompBlock
->
numOfCols
);
pDataCols
->
numOfRows
=
pCompBlock
->
numOfRows
;
...
...
src/tsdb/tests/tsdbTests.cpp
浏览文件 @
3d089318
...
...
@@ -39,7 +39,9 @@ static int insertData(SInsertInfo *pInfo) {
pBlock
->
uid
=
pInfo
->
uid
;
pBlock
->
tid
=
pInfo
->
tid
;
pBlock
->
sversion
=
pInfo
->
sversion
;
pBlock
->
len
=
0
;
pBlock
->
dataLen
=
0
;
pBlock
->
schemaLen
=
0
;
pBlock
->
numOfRows
=
0
;
for
(
int
i
=
0
;
i
<
pInfo
->
rowsPerSubmit
;
i
++
)
{
// start_time += 1000;
if
(
pInfo
->
isAscend
)
{
...
...
@@ -47,7 +49,7 @@ static int insertData(SInsertInfo *pInfo) {
}
else
{
start_time
-=
pInfo
->
interval
;
}
SDataRow
row
=
(
SDataRow
)(
pBlock
->
data
+
pBlock
->
l
en
);
SDataRow
row
=
(
SDataRow
)(
pBlock
->
data
+
pBlock
->
dataL
en
);
tdInitDataRow
(
row
,
pInfo
->
pSchema
);
for
(
int
j
=
0
;
j
<
schemaNCols
(
pInfo
->
pSchema
);
j
++
)
{
...
...
@@ -59,13 +61,15 @@ static int insertData(SInsertInfo *pInfo) {
tdAppendColVal
(
row
,
(
void
*
)(
&
val
),
pTCol
->
type
,
pTCol
->
bytes
,
pTCol
->
offset
);
}
}
pBlock
->
len
+=
dataRowLen
(
row
);
pBlock
->
dataLen
+=
dataRowLen
(
row
);
pBlock
->
numOfRows
++
;
}
pMsg
->
length
=
pMsg
->
length
+
sizeof
(
SSubmitBlk
)
+
pBlock
->
l
en
;
pMsg
->
length
=
sizeof
(
SSubmitMsg
)
+
sizeof
(
SSubmitBlk
)
+
pBlock
->
dataL
en
;
pMsg
->
numOfBlocks
=
1
;
pBlock
->
len
=
htonl
(
pBlock
->
l
en
);
pBlock
->
dataLen
=
htonl
(
pBlock
->
dataL
en
);
pBlock
->
numOfRows
=
htonl
(
pBlock
->
numOfRows
);
pBlock
->
schemaLen
=
htonl
(
pBlock
->
schemaLen
);
pBlock
->
uid
=
htobe64
(
pBlock
->
uid
);
pBlock
->
tid
=
htonl
(
pBlock
->
tid
);
...
...
@@ -74,7 +78,6 @@ static int insertData(SInsertInfo *pInfo) {
pMsg
->
length
=
htonl
(
pMsg
->
length
);
pMsg
->
numOfBlocks
=
htonl
(
pMsg
->
numOfBlocks
);
pMsg
->
compressed
=
htonl
(
pMsg
->
numOfBlocks
);
if
(
tsdbInsertData
(
pInfo
->
pRepo
,
pMsg
,
NULL
)
<
0
)
{
tfree
(
pMsg
);
...
...
src/util/src/tutil.c
浏览文件 @
3d089318
...
...
@@ -239,7 +239,10 @@ char* strntolower(char *dst, const char *src, int32_t n) {
char
quote
=
0
,
*
p
=
dst
,
c
;
assert
(
dst
!=
NULL
);
if
(
n
==
0
)
{
*
p
=
0
;
return
dst
;
}
for
(
c
=
*
src
++
;
n
--
>
0
;
c
=
*
src
++
)
{
if
(
esc
)
{
esc
=
0
;
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
3d089318
...
...
@@ -259,7 +259,6 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
appH
.
cqH
=
pVnode
->
cq
;
appH
.
cqCreateFunc
=
cqCreate
;
appH
.
cqDropFunc
=
cqDrop
;
appH
.
configFunc
=
dnodeSendCfgTableToRecv
;
sprintf
(
temp
,
"%s/tsdb"
,
rootDir
);
pVnode
->
tsdb
=
tsdbOpenRepo
(
temp
,
&
appH
);
if
(
pVnode
->
tsdb
==
NULL
)
{
...
...
@@ -588,7 +587,6 @@ static int vnodeResetTsdb(SVnodeObj *pVnode)
appH
.
cqH
=
pVnode
->
cq
;
appH
.
cqCreateFunc
=
cqCreate
;
appH
.
cqDropFunc
=
cqDrop
;
appH
.
configFunc
=
dnodeSendCfgTableToRecv
;
pVnode
->
tsdb
=
tsdbOpenRepo
(
rootDir
,
&
appH
);
pVnode
->
status
=
TAOS_VN_STATUS_READY
;
...
...
tests/perftest-scripts/tdengineTestQ1Loop.sh
0 → 100755
浏览文件 @
3d089318
#!/bin/bash
DATA_DIR
=
/mnt/root/testdata
NUM_LOOP
=
5
function
printTo
{
if
$verbose
;
then
echo
$1
fi
}
TDTESTQ1OUT
=
tdengineTestQ1.out
function
runTest
{
totalG0
=
0
totalG10
=
0
totalG20
=
0
totalG30
=
0
totalG40
=
0
totalG50
=
0
totalG60
=
0
totalG70
=
0
totalG80
=
0
totalG90
=
0
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-sql q1.txt"
restartTaosd
$TDTEST_DIR
/tdengineTest
\
-sql
$TDTEST_DIR
/q1.txt
>
$TDTESTQ1OUT
G0
=
`
grep
"devgroup=0"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG0
=
`
echo
"scale=4;
$totalG0
+
$G0
"
| bc
`
printTo
"i:
$i
, G0:
$G0
, totalG0:
$totalG0
"
G10
=
`
grep
"devgroup=10"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG10
=
`
echo
"scale=4;
$totalG10
+
$G10
"
| bc
`
printTo
"i:
$i
, G10:
$G10
, totalG10:
$totalG10
"
G20
=
`
grep
"devgroup=20"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG20
=
`
echo
"scale=4;
$totalG20
+
$G20
"
| bc
`
G30
=
`
grep
"devgroup=30"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG30
=
`
echo
"scale=4;
$totalG30
+
$G30
"
| bc
`
G40
=
`
grep
"devgroup=40"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG40
=
`
echo
"scale=4;
$totalG40
+
$G40
"
| bc
`
G50
=
`
grep
"devgroup=50"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG50
=
`
echo
"scale=4;
$totalG50
+
$G50
"
| bc
`
G60
=
`
grep
"devgroup=60"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG60
=
`
echo
"scale=4;
$totalG60
+
$G60
"
| bc
`
G70
=
`
grep
"devgroup=70"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG70
=
`
echo
"scale=4;
$totalG70
+
$G70
"
| bc
`
G80
=
`
grep
"devgroup=80"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG80
=
`
echo
"scale=4;
$totalG80
+
$G80
"
| bc
`
G90
=
`
grep
"devgroup=90"
$TDTESTQ1OUT
|
awk
'{print $3}'
`
totalG90
=
`
echo
"scale=4;
$totalG90
+
$G90
"
| bc
`
printTo
"i:
$i
, G90:
$G90
, totalG90:
$totalG90
"
done
avgG0
=
`
echo
"scale=4; x =
$totalG0
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG10
=
`
echo
"scale=4; x =
$totalG10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG20
=
`
echo
"scale=4; x =
$totalG20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG30
=
`
echo
"scale=4; x =
$totalG30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG40
=
`
echo
"scale=4; x =
$totalG40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG50
=
`
echo
"scale=4; x =
$totalG50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG60
=
`
echo
"scale=4; x =
$totalG60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG70
=
`
echo
"scale=4; x =
$totalG70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG80
=
`
echo
"scale=4; x =
$totalG80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG90
=
`
echo
"scale=4; x =
$totalG90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
echo
"Latency, G-0, G-10, G-20, G-30, G-40, G-50, G-60, G-70, G-80, G-90"
echo
"TDengine,
$avgG0
,
$avgG10
,
$avgG20
,
$avgG30
,
$avgG40
,
$avgG50
,
$avgG60
,
$avgG70
,
$avgG80
,
$avgG90
"
}
function
restartTaosd
{
printTo
"Stop taosd"
systemctl stop taosd
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
while
[
-n
"
$PID
"
]
do
pkill
-TERM
-x
taosd
sleep
1
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
done
printTo
"Start taosd"
$TAOSD_DIR
/taosd
>
/dev/null 2>&1 &
sleep
10
}
################ Main ################
master
=
false
develop
=
true
verbose
=
false
for
arg
in
"
$@
"
do
case
$arg
in
-v
)
verbose
=
true
;;
master
)
master
=
true
develop
=
false
;;
develop
)
master
=
false
develop
=
true
;;
*
)
;;
esac
done
if
$master
;
then
echo
"Test master branch.."
cp
/mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine.master
else
echo
"Test develop branch.."
cp
/mnt/root/cfg/10billion/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine
fi
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
runTest
echo
"Test done!"
tests/perftest-scripts/tdengineTestQ2Loop.sh
0 → 100755
浏览文件 @
3d089318
#!/bin/bash
DATA_DIR
=
/mnt/root/testdata
NUM_LOOP
=
5
function
printTo
{
if
$verbose
;
then
echo
$1
fi
}
TDTESTQ2OUT
=
tdengineTestQ2.out
function
runTest
{
totalCount10
=
0
totalCount20
=
0
totalCount30
=
0
totalCount40
=
0
totalCount50
=
0
totalCount60
=
0
totalCount70
=
0
totalCount80
=
0
totalCount90
=
0
totalCount100
=
0
totalAvg10
=
0
totalAvg20
=
0
totalAvg30
=
0
totalAvg40
=
0
totalAvg50
=
0
totalAvg60
=
0
totalAvg70
=
0
totalAvg80
=
0
totalAvg90
=
0
totalAvg100
=
0
totalSum10
=
0
totalSum20
=
0
totalSum30
=
0
totalSum40
=
0
totalSum50
=
0
totalSum60
=
0
totalSum70
=
0
totalSum80
=
0
totalSum90
=
0
totalSum100
=
0
totalMax10
=
0
totalMax20
=
0
totalMax30
=
0
totalMax40
=
0
totalMax50
=
0
totalMax60
=
0
totalMax70
=
0
totalMax80
=
0
totalMax90
=
0
totalMax100
=
0
totalMin10
=
0
totalMin20
=
0
totalMin30
=
0
totalMin40
=
0
totalMin50
=
0
totalMin60
=
0
totalMin70
=
0
totalMin80
=
0
totalMin90
=
0
totalMin100
=
0
totalSpread10
=
0
totalSpread20
=
0
totalSpread30
=
0
totalSpread40
=
0
totalSpread50
=
0
totalSpread60
=
0
totalSpread70
=
0
totalSpread80
=
0
totalSpread90
=
0
totalSpread100
=
0
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-sql q2.txt"
restartTaosd
$TDTEST_DIR
/tdengineTest
\
-sql
$TDTEST_DIR
/q2.txt
>
$TDTESTQ2OUT
Count10
=
`
cat
$TDTESTQ2OUT
|
grep
"count"
|
grep
"devgroup<10;"
|
awk
'{print $3}'
`
totalCount10
=
`
echo
"scale=4;
$totalCount10
+
$Count10
"
| bc
`
Count20
=
`
cat
$TDTESTQ2OUT
|
grep
"count"
|
grep
"devgroup<20;"
|
awk
'{print $3}'
`
totalCount20
=
`
echo
"scale=4;
$totalCount20
+
$Count20
"
| bc
`
Count30
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<30;"
|
awk
'{print $3}'
`
totalCount30
=
`
echo
"scale=4;
$totalCount30
+
$Count30
"
| bc
`
Count40
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<40;"
|
awk
'{print $3}'
`
totalCount40
=
`
echo
"scale=4;
$totalCount40
+
$Count40
"
| bc
`
Count50
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<50;"
|
awk
'{print $3}'
`
totalCount50
=
`
echo
"scale=4;
$totalCount50
+
$Count50
"
| bc
`
Count60
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<60;"
|
awk
'{print $3}'
`
totalCount60
=
`
echo
"scale=4;
$totalCount60
+
$Count60
"
| bc
`
Count70
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<70;"
|
awk
'{print $3}'
`
totalCount70
=
`
echo
"scale=4;
$totalCount70
+
$Count70
"
| bc
`
Count80
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<80;"
|
awk
'{print $3}'
`
totalCount80
=
`
echo
"scale=4;
$totalCount80
+
$Count80
"
| bc
`
Count90
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"devgroup<90;"
|
awk
'{print $3}'
`
totalCount90
=
`
echo
"scale=4;
$totalCount90
+
$Count90
"
| bc
`
Count100
=
`
cat
$TDTESTQ2OUT
|
grep
count |
grep
"db.devices;"
|
awk
'{print $3}'
`
totalCount100
=
`
echo
"scale=4;
$totalCount100
+
$Count100
"
| bc
`
Avg10
=
`
cat
$TDTESTQ2OUT
|
grep
"avg"
|
grep
"devgroup<10;"
|
awk
'{print $3}'
`
totalAvg10
=
`
echo
"scale=4;
$totalAvg10
+
$Avg10
"
| bc
`
Avg20
=
`
cat
$TDTESTQ2OUT
|
grep
"avg"
|
grep
"devgroup<20;"
|
awk
'{print $3}'
`
totalAvg20
=
`
echo
"scale=4;
$totalAvg20
+
$Avg20
"
| bc
`
Avg30
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<30;"
|
awk
'{print $3}'
`
totalAvg30
=
`
echo
"scale=4;
$totalAvg30
+
$Avg30
"
| bc
`
Avg40
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<40;"
|
awk
'{print $3}'
`
totalAvg40
=
`
echo
"scale=4;
$totalAvg40
+
$Avg40
"
| bc
`
Avg50
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<50;"
|
awk
'{print $3}'
`
totalAvg50
=
`
echo
"scale=4;
$totalAvg50
+
$Avg50
"
| bc
`
Avg60
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<60;"
|
awk
'{print $3}'
`
totalAvg60
=
`
echo
"scale=4;
$totalAvg60
+
$Avg60
"
| bc
`
Avg70
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<70;"
|
awk
'{print $3}'
`
totalAvg70
=
`
echo
"scale=4;
$totalAvg70
+
$Avg70
"
| bc
`
Avg80
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<80;"
|
awk
'{print $3}'
`
totalAvg80
=
`
echo
"scale=4;
$totalAvg80
+
$Avg80
"
| bc
`
Avg90
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"devgroup<90;"
|
awk
'{print $3}'
`
totalAvg90
=
`
echo
"scale=4;
$totalAvg90
+
$Avg90
"
| bc
`
Avg100
=
`
cat
$TDTESTQ2OUT
|
grep
avg |
grep
"db.devices;"
|
awk
'{print $3}'
`
totalAvg100
=
`
echo
"scale=4;
$totalAvg100
+
$Avg100
"
| bc
`
Sum10
=
`
cat
$TDTESTQ2OUT
|
grep
"sum"
|
grep
"devgroup<10;"
|
awk
'{print $3}'
`
totalSum10
=
`
echo
"scale=4;
$totalSum10
+
$Sum10
"
| bc
`
Sum20
=
`
cat
$TDTESTQ2OUT
|
grep
"sum"
|
grep
"devgroup<20;"
|
awk
'{print $3}'
`
totalSum20
=
`
echo
"scale=4;
$totalSum20
+
$Sum20
"
| bc
`
Sum30
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<30;"
|
awk
'{print $3}'
`
totalSum30
=
`
echo
"scale=4;
$totalSum30
+
$Sum30
"
| bc
`
Sum40
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<40;"
|
awk
'{print $3}'
`
totalSum40
=
`
echo
"scale=4;
$totalSum40
+
$Sum40
"
| bc
`
Sum50
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<50;"
|
awk
'{print $3}'
`
totalSum50
=
`
echo
"scale=4;
$totalSum50
+
$Sum50
"
| bc
`
Sum60
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<60;"
|
awk
'{print $3}'
`
totalSum60
=
`
echo
"scale=4;
$totalSum60
+
$Sum60
"
| bc
`
Sum70
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<70;"
|
awk
'{print $3}'
`
totalSum70
=
`
echo
"scale=4;
$totalSum70
+
$Sum70
"
| bc
`
Sum80
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<80;"
|
awk
'{print $3}'
`
totalSum80
=
`
echo
"scale=4;
$totalSum80
+
$Sum80
"
| bc
`
Sum90
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"devgroup<90;"
|
awk
'{print $3}'
`
totalSum90
=
`
echo
"scale=4;
$totalSum90
+
$Sum90
"
| bc
`
Sum100
=
`
cat
$TDTESTQ2OUT
|
grep sum
|
grep
"db.devices;"
|
awk
'{print $3}'
`
totalSum100
=
`
echo
"scale=4;
$totalSum100
+
$Sum100
"
| bc
`
Max10
=
`
cat
$TDTESTQ2OUT
|
grep
"max"
|
grep
"devgroup<10;"
|
awk
'{print $3}'
`
totalMax10
=
`
echo
"scale=4;
$totalMax10
+
$Max10
"
| bc
`
Max20
=
`
cat
$TDTESTQ2OUT
|
grep
"max"
|
grep
"devgroup<20;"
|
awk
'{print $3}'
`
totalMax20
=
`
echo
"scale=4;
$totalMax20
+
$Max20
"
| bc
`
Max30
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<30;"
|
awk
'{print $3}'
`
totalMax30
=
`
echo
"scale=4;
$totalMax30
+
$Max30
"
| bc
`
Max40
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<40;"
|
awk
'{print $3}'
`
totalMax40
=
`
echo
"scale=4;
$totalMax40
+
$Max40
"
| bc
`
Max50
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<50;"
|
awk
'{print $3}'
`
totalMax50
=
`
echo
"scale=4;
$totalMax50
+
$Max50
"
| bc
`
Max60
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<60;"
|
awk
'{print $3}'
`
totalMax60
=
`
echo
"scale=4;
$totalMax60
+
$Max60
"
| bc
`
Max70
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<70;"
|
awk
'{print $3}'
`
totalMax70
=
`
echo
"scale=4;
$totalMax70
+
$Max70
"
| bc
`
Max80
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<80;"
|
awk
'{print $3}'
`
totalMax80
=
`
echo
"scale=4;
$totalMax80
+
$Max80
"
| bc
`
Max90
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"devgroup<90;"
|
awk
'{print $3}'
`
totalMax90
=
`
echo
"scale=4;
$totalMax90
+
$Max90
"
| bc
`
Max100
=
`
cat
$TDTESTQ2OUT
|
grep
max |
grep
"db.devices;"
|
awk
'{print $3}'
`
totalMax100
=
`
echo
"scale=4;
$totalMax100
+
$Max100
"
| bc
`
Min10
=
`
cat
$TDTESTQ2OUT
|
grep
"min"
|
grep
"devgroup<10;"
|
awk
'{print $3}'
`
totalMin10
=
`
echo
"scale=4;
$totalMin10
+
$Min10
"
| bc
`
Min20
=
`
cat
$TDTESTQ2OUT
|
grep
"min"
|
grep
"devgroup<20;"
|
awk
'{print $3}'
`
totalMin20
=
`
echo
"scale=4;
$totalMin20
+
$Min20
"
| bc
`
Min30
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<30;"
|
awk
'{print $3}'
`
totalMin30
=
`
echo
"scale=4;
$totalMin30
+
$Min30
"
| bc
`
Min40
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<40;"
|
awk
'{print $3}'
`
totalMin40
=
`
echo
"scale=4;
$totalMin40
+
$Min40
"
| bc
`
Min50
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<50;"
|
awk
'{print $3}'
`
totalMin50
=
`
echo
"scale=4;
$totalMin50
+
$Min50
"
| bc
`
Min60
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<60;"
|
awk
'{print $3}'
`
totalMin60
=
`
echo
"scale=4;
$totalMin60
+
$Min60
"
| bc
`
Min70
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<70;"
|
awk
'{print $3}'
`
totalMin70
=
`
echo
"scale=4;
$totalMin70
+
$Min70
"
| bc
`
Min80
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<80;"
|
awk
'{print $3}'
`
totalMin80
=
`
echo
"scale=4;
$totalMin80
+
$Min80
"
| bc
`
Min90
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"devgroup<90;"
|
awk
'{print $3}'
`
totalMin90
=
`
echo
"scale=4;
$totalMin90
+
$Min90
"
| bc
`
Min100
=
`
cat
$TDTESTQ2OUT
|
grep
min |
grep
"db.devices;"
|
awk
'{print $3}'
`
totalMin100
=
`
echo
"scale=4;
$totalMin100
+
$Min100
"
| bc
`
Spread10
=
`
cat
$TDTESTQ2OUT
|
grep
"spread"
|
grep
"devgroup<10;"
|
awk
'{print $3}'
`
totalSpread10
=
`
echo
"scale=4;
$totalSpread10
+
$Spread10
"
| bc
`
Spread20
=
`
cat
$TDTESTQ2OUT
|
grep
"spread"
|
grep
"devgroup<20;"
|
awk
'{print $3}'
`
totalSpread20
=
`
echo
"scale=4;
$totalSpread20
+
$Spread20
"
| bc
`
Spread30
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<30;"
|
awk
'{print $3}'
`
totalSpread30
=
`
echo
"scale=4;
$totalSpread30
+
$Spread30
"
| bc
`
Spread40
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<40;"
|
awk
'{print $3}'
`
totalSpread40
=
`
echo
"scale=4;
$totalSpread40
+
$Spread40
"
| bc
`
Spread50
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<50;"
|
awk
'{print $3}'
`
totalSpread50
=
`
echo
"scale=4;
$totalSpread50
+
$Spread50
"
| bc
`
Spread60
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<60;"
|
awk
'{print $3}'
`
totalSpread60
=
`
echo
"scale=4;
$totalSpread60
+
$Spread60
"
| bc
`
Spread70
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<70;"
|
awk
'{print $3}'
`
totalSpread70
=
`
echo
"scale=4;
$totalSpread70
+
$Spread70
"
| bc
`
Spread80
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<80;"
|
awk
'{print $3}'
`
totalSpread80
=
`
echo
"scale=4;
$totalSpread80
+
$Spread80
"
| bc
`
Spread90
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"devgroup<90;"
|
awk
'{print $3}'
`
totalSpread90
=
`
echo
"scale=4;
$totalSpread90
+
$Spread90
"
| bc
`
Spread100
=
`
cat
$TDTESTQ2OUT
|
grep
spread |
grep
"db.devices;"
|
awk
'{print $3}'
`
totalSpread100
=
`
echo
"scale=4;
$totalSpread100
+
$Spread100
"
| bc
`
done
avgCount10
=
`
echo
"scale=4; x =
$totalCount10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount20
=
`
echo
"scale=4; x =
$totalCount20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount30
=
`
echo
"scale=4; x =
$totalCount30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount40
=
`
echo
"scale=4; x =
$totalCount40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount50
=
`
echo
"scale=4; x =
$totalCount50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount60
=
`
echo
"scale=4; x =
$totalCount60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount70
=
`
echo
"scale=4; x =
$totalCount70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount80
=
`
echo
"scale=4; x =
$totalCount80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount90
=
`
echo
"scale=4; x =
$totalCount90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgCount100
=
`
echo
"scale=4; x =
$totalCount100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg10
=
`
echo
"scale=4; x =
$totalAvg10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg20
=
`
echo
"scale=4; x =
$totalAvg20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg30
=
`
echo
"scale=4; x =
$totalAvg30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg40
=
`
echo
"scale=4; x =
$totalAvg40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg50
=
`
echo
"scale=4; x =
$totalAvg50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg60
=
`
echo
"scale=4; x =
$totalAvg60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg70
=
`
echo
"scale=4; x =
$totalAvg70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg80
=
`
echo
"scale=4; x =
$totalAvg80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg90
=
`
echo
"scale=4; x =
$totalAvg90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgAvg100
=
`
echo
"scale=4; x =
$totalAvg100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum10
=
`
echo
"scale=4; x =
$totalSum10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum20
=
`
echo
"scale=4; x =
$totalSum20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum30
=
`
echo
"scale=4; x =
$totalSum30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum40
=
`
echo
"scale=4; x =
$totalSum40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum50
=
`
echo
"scale=4; x =
$totalSum50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum60
=
`
echo
"scale=4; x =
$totalSum60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum70
=
`
echo
"scale=4; x =
$totalSum70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum80
=
`
echo
"scale=4; x =
$totalSum80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum90
=
`
echo
"scale=4; x =
$totalSum90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSum100
=
`
echo
"scale=4; x =
$totalSum100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax10
=
`
echo
"scale=4; x =
$totalMax10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax20
=
`
echo
"scale=4; x =
$totalMax20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax30
=
`
echo
"scale=4; x =
$totalMax30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax40
=
`
echo
"scale=4; x =
$totalMax40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax50
=
`
echo
"scale=4; x =
$totalMax50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax60
=
`
echo
"scale=4; x =
$totalMax60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax70
=
`
echo
"scale=4; x =
$totalMax70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax80
=
`
echo
"scale=4; x =
$totalMax80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax90
=
`
echo
"scale=4; x =
$totalMax90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMax100
=
`
echo
"scale=4; x =
$totalMax100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin10
=
`
echo
"scale=4; x =
$totalMin10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin20
=
`
echo
"scale=4; x =
$totalMin20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin30
=
`
echo
"scale=4; x =
$totalMin30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin40
=
`
echo
"scale=4; x =
$totalMin40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin50
=
`
echo
"scale=4; x =
$totalMin50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin60
=
`
echo
"scale=4; x =
$totalMin60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin70
=
`
echo
"scale=4; x =
$totalMin70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin80
=
`
echo
"scale=4; x =
$totalMin80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin90
=
`
echo
"scale=4; x =
$totalMin90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgMin100
=
`
echo
"scale=4; x =
$totalMin100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread10
=
`
echo
"scale=4; x =
$totalSpread10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread20
=
`
echo
"scale=4; x =
$totalSpread20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread30
=
`
echo
"scale=4; x =
$totalSpread30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread40
=
`
echo
"scale=4; x =
$totalSpread40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread50
=
`
echo
"scale=4; x =
$totalSpread50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread60
=
`
echo
"scale=4; x =
$totalSpread60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread70
=
`
echo
"scale=4; x =
$totalSpread70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread80
=
`
echo
"scale=4; x =
$totalSpread80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread90
=
`
echo
"scale=4; x =
$totalSpread90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgSpread100
=
`
echo
"scale=4; x =
$totalSpread100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
echo
"Latency, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%"
echo
"Count,
$avgCount10
,
$avgCount20
,
$avgCount30
,
$avgCount40
,
$avgCount50
,
$avgCount60
,
$avgCount70
,
$avgCount80
,
$avgCount90
,
$avgCount100
"
echo
"Avg,
$avgAvg10
,
$avgAvg20
,
$avgAvg30
,
$avgAvg40
,
$avgAvg50
,
$avgAvg60
,
$avgAvg70
,
$avgAvg80
,
$avgAvg90
,
$avgAvg100
"
echo
"Sum,
$avgSum10
,
$avgSum20
,
$avgSum30
,
$avgSum40
,
$avgSum50
,
$avgSum60
,
$avgSum70
,
$avgSum80
,
$avgSum90
,
$avgSum100
"
echo
"Max,
$avgMax10
,
$avgMax20
,
$avgMax30
,
$avgMax40
,
$avgMax50
,
$avgMax60
,
$avgMax70
,
$avgMax80
,
$avgMax90
,
$avgMax100
"
echo
"Min,
$avgMin10
,
$avgMin20
,
$avgMin30
,
$avgMin40
,
$avgMin50
,
$avgMin60
,
$avgMin70
,
$avgMin80
,
$avgMin90
,
$avgMin100
"
echo
"Spread,
$avgSpread10
,
$avgSpread20
,
$avgSpread30
,
$avgSpread40
,
$avgSpread50
,
$avgSpread60
,
$avgSpread70
,
$avgSpread80
,
$avgSpread90
,
$avgSpread100
"
}
function
restartTaosd
{
printTo
"Stop taosd"
systemctl stop taosd
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
while
[
-n
"
$PID
"
]
do
pkill
-TERM
-x
taosd
sleep
1
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
done
printTo
"Start taosd"
$TAOSD_DIR
/taosd
>
/dev/null 2>&1 &
sleep
10
}
################ Main ################
master
=
false
develop
=
true
verbose
=
false
for
arg
in
"
$@
"
do
case
$arg
in
-v
)
verbose
=
true
;;
master
)
master
=
true
develop
=
false
;;
develop
)
master
=
false
develop
=
true
;;
*
)
;;
esac
done
if
$master
;
then
echo
"Test master branch.."
cp
/mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine.master
else
echo
"Test develop branch.."
cp
/mnt/root/cfg/10billion/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine
fi
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
runTest
echo
"Test done!"
tests/perftest-scripts/tdengineTestQ3Loop.sh
0 → 100755
浏览文件 @
3d089318
#!/bin/bash
DATA_DIR
=
/mnt/root/testdata
NUM_LOOP
=
5
function
printTo
{
if
$verbose
;
then
echo
$1
fi
}
TDTESTQ3OUT
=
tdengineTestQ3.out
function
runTest
{
totalG10
=
0
totalG20
=
0
totalG30
=
0
totalG40
=
0
totalG50
=
0
totalG60
=
0
totalG70
=
0
totalG80
=
0
totalG90
=
0
totalG100
=
0
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-sql q3.txt"
restartTaosd
$TDTEST_DIR
/tdengineTest
\
-sql
$TDTEST_DIR
/q3.txt
>
$TDTESTQ3OUT
G10
=
`
grep
"devgroup<10"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG10
=
`
echo
"scale=4;
$totalG10
+
$G10
"
| bc
`
G20
=
`
grep
"devgroup<20"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG20
=
`
echo
"scale=4;
$totalG20
+
$G20
"
| bc
`
G30
=
`
grep
"devgroup<30"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG30
=
`
echo
"scale=4;
$totalG30
+
$G30
"
| bc
`
G40
=
`
grep
"devgroup<40"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG40
=
`
echo
"scale=4;
$totalG40
+
$G40
"
| bc
`
G50
=
`
grep
"devgroup<50"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG50
=
`
echo
"scale=4;
$totalG50
+
$G50
"
| bc
`
G60
=
`
grep
"devgroup<60"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG60
=
`
echo
"scale=4;
$totalG60
+
$G60
"
| bc
`
G70
=
`
grep
"devgroup<70"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG70
=
`
echo
"scale=4;
$totalG70
+
$G70
"
| bc
`
G80
=
`
grep
"devgroup<80"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG80
=
`
echo
"scale=4;
$totalG80
+
$G80
"
| bc
`
G90
=
`
grep
"devgroup<90"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG90
=
`
echo
"scale=4;
$totalG90
+
$G90
"
| bc
`
G100
=
`
grep
"db.devices group by devgroup;"
$TDTESTQ3OUT
|
awk
'{print $3}'
`
totalG100
=
`
echo
"scale=4;
$totalG100
+
$G100
"
| bc
`
done
avgG10
=
`
echo
"scale=4; x =
$totalG10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG20
=
`
echo
"scale=4; x =
$totalG20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG30
=
`
echo
"scale=4; x =
$totalG30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG40
=
`
echo
"scale=4; x =
$totalG40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG50
=
`
echo
"scale=4; x =
$totalG50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG60
=
`
echo
"scale=4; x =
$totalG60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG70
=
`
echo
"scale=4; x =
$totalG70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG80
=
`
echo
"scale=4; x =
$totalG80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG90
=
`
echo
"scale=4; x =
$totalG90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG100
=
`
echo
"scale=4; x =
$totalG100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
echo
"Latency, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%"
echo
"TDengine,
$avgG10
,
$avgG20
,
$avgG30
,
$avgG40
,
$avgG50
,
$avgG60
,
$avgG70
,
$avgG80
,
$avgG90
,
$avgG100
"
}
function
restartTaosd
{
printTo
"Stop taosd"
systemctl stop taosd
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
while
[
-n
"
$PID
"
]
do
pkill
-TERM
-x
taosd
sleep
1
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
done
printTo
"Start taosd"
$TAOSD_DIR
/taosd
>
/dev/null 2>&1 &
sleep
10
}
################ Main ################
master
=
false
develop
=
true
verbose
=
false
for
arg
in
"
$@
"
do
case
$arg
in
-v
)
verbose
=
true
;;
master
)
master
=
true
develop
=
false
;;
develop
)
master
=
false
develop
=
true
;;
*
)
;;
esac
done
if
$master
;
then
echo
"Test master branch.."
cp
/mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine.master
else
echo
"Test develop branch.."
cp
/mnt/root/cfg/10billion/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine
fi
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
runTest
echo
"Test done!"
tests/perftest-scripts/tdengineTestQ4Loop.sh
0 → 100755
浏览文件 @
3d089318
#!/bin/bash
DATA_DIR
=
/mnt/root/testdata
NUM_LOOP
=
5
function
printTo
{
if
$verbose
;
then
echo
$1
fi
}
TDTESTQ4OUT
=
tdengineTestQ4.out
function
runTest
{
totalG10
=
0
totalG20
=
0
totalG30
=
0
totalG40
=
0
totalG50
=
0
totalG60
=
0
totalG70
=
0
totalG80
=
0
totalG90
=
0
totalG100
=
0
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-sql q4.txt"
restartTaosd
$TDTEST_DIR
/tdengineTest
\
-sql
$TDTEST_DIR
/q4.txt
>
$TDTESTQ4OUT
G10
=
`
grep
"devgroup<10"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG10
=
`
echo
"scale=4;
$totalG10
+
$G10
"
| bc
`
G20
=
`
grep
"devgroup<20"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG20
=
`
echo
"scale=4;
$totalG20
+
$G20
"
| bc
`
G30
=
`
grep
"devgroup<30"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG30
=
`
echo
"scale=4;
$totalG30
+
$G30
"
| bc
`
G40
=
`
grep
"devgroup<40"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG40
=
`
echo
"scale=4;
$totalG40
+
$G40
"
| bc
`
G50
=
`
grep
"devgroup<50"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG50
=
`
echo
"scale=4;
$totalG50
+
$G50
"
| bc
`
G60
=
`
grep
"devgroup<60"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG60
=
`
echo
"scale=4;
$totalG60
+
$G60
"
| bc
`
G70
=
`
grep
"devgroup<70"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG70
=
`
echo
"scale=4;
$totalG70
+
$G70
"
| bc
`
G80
=
`
grep
"devgroup<80"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG80
=
`
echo
"scale=4;
$totalG80
+
$G80
"
| bc
`
G90
=
`
grep
"devgroup<90"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG90
=
`
echo
"scale=4;
$totalG90
+
$G90
"
| bc
`
G100
=
`
grep
"db.devices interval"
$TDTESTQ4OUT
|
awk
'{print $3}'
`
totalG100
=
`
echo
"scale=4;
$totalG100
+
$G100
"
| bc
`
done
avgG10
=
`
echo
"scale=4; x =
$totalG10
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG20
=
`
echo
"scale=4; x =
$totalG20
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG30
=
`
echo
"scale=4; x =
$totalG30
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG40
=
`
echo
"scale=4; x =
$totalG40
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG50
=
`
echo
"scale=4; x =
$totalG50
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG60
=
`
echo
"scale=4; x =
$totalG60
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG70
=
`
echo
"scale=4; x =
$totalG70
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG80
=
`
echo
"scale=4; x =
$totalG80
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG90
=
`
echo
"scale=4; x =
$totalG90
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
avgG100
=
`
echo
"scale=4; x =
$totalG100
/
$NUM_LOOP
; if(x<1) print 0; x"
| bc
`
echo
"Latency, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%"
echo
"TDengine,
$avgG10
,
$avgG20
,
$avgG30
,
$avgG40
,
$avgG50
,
$avgG60
,
$avgG70
,
$avgG80
,
$avgG90
,
$avgG100
"
}
function
restartTaosd
{
printTo
"Stop taosd"
systemctl stop taosd
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
while
[
-n
"
$PID
"
]
do
pkill
-TERM
-x
taosd
sleep
1
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
done
printTo
"Start taosd"
$TAOSD_DIR
/taosd
>
/dev/null 2>&1 &
sleep
10
}
################ Main ################
master
=
false
develop
=
true
verbose
=
false
for
arg
in
"
$@
"
do
case
$arg
in
-v
)
verbose
=
true
;;
master
)
master
=
true
develop
=
false
;;
develop
)
master
=
false
develop
=
true
;;
*
)
;;
esac
done
if
$master
;
then
echo
"Test master branch.."
cp
/mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine.master
else
echo
"Test develop branch.."
cp
/mnt/root/cfg/10billion/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine
fi
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
runTest
echo
"Test done!"
tests/perftest-scripts/tdengineTestWriteLoop.sh
0 → 100755
浏览文件 @
3d089318
#!/bin/bash
DATA_DIR
=
/mnt/root/testdata
NUM_LOOP
=
5
NUM_OF_FILES
=
100
rowsPerRequest
=(
1 100 500 1000 2000
)
numOfClients
=(
1 2 3 4 5 6 7
)
function
printTo
{
if
$verbose
;
then
echo
$1
fi
}
function
runTest
{
printf
"R/R, "
for
c
in
${
numOfClients
[@]
}
;
do
if
[
"
$c
"
==
"1"
]
;
then
printf
"
$c
client, "
else
printf
"
$c
clients, "
fi
done
printf
"
\n
"
for
r
in
${
rowsPerRequest
[@]
}
;
do
printf
"
$r
, "
for
c
in
${
numOfClients
[@]
}
;
do
totalRPR
=
0
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
restartTaosd
$TAOSD_DIR
/taos
-s
"drop database db"
>
/dev/null 2>&1
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-dataDir
$DATA_DIR
\
-numOfFiles
$NUM_OF_FILES
\
-writeClients
$c
\
-rowsPerRequest
$r
"
RPR
=
`
$TDTEST_DIR
/tdengineTest
\
-dataDir
$DATA_DIR
\
-numOfFiles
1
\
-writeClients
$c
\
-rowsPerRequest
$r
\
|
grep
speed |
awk
'{print $(NF-1)}'
`
totalRPR
=
`
echo
"scale=4;
$totalRPR
+
$RPR
"
| bc
`
printTo
"rows:
$r
, clients:
$c
, i:
$i
RPR:
$RPR
"
done
avgRPR
=
`
echo
"scale=4;
$totalRPR
/
$NUM_LOOP
"
| bc
`
printf
"
$avgRPR
, "
done
printf
"
\n
"
done
}
function
restartTaosd
{
printTo
"Stop taosd"
systemctl stop taosd
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
while
[
-n
"
$PID
"
]
do
pkill
-TERM
-x
taosd
sleep
1
PID
=
`
ps
-ef
|grep
-w
taosd |
grep
-v
grep
|
awk
'{print $2}'
`
done
printTo
"Start taosd"
$TAOSD_DIR
/taosd
>
/dev/null 2>&1 &
sleep
10
}
################ Main ################
master
=
false
develop
=
true
verbose
=
false
for
arg
in
"
$@
"
do
case
$arg
in
-v
)
verbose
=
true
;;
master
)
master
=
true
develop
=
false
;;
develop
)
master
=
false
develop
=
true
;;
*
)
;;
esac
done
if
$master
;
then
echo
"Test master branch.."
cp
/mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine.master
else
echo
"Test develop branch.."
cp
/mnt/root/cfg/10billion/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine
fi
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
runTest
echo
"Test done!"
tests/pytest/tag_lite/add.py
浏览文件 @
3d089318
...
...
@@ -100,6 +100,8 @@ class TDTestCase:
# TSIM: sql alter table $mt add tag tgcol4 int
tdLog
.
info
(
'alter table %s add tag tgcol4 int'
%
(
mt
))
tdSql
.
execute
(
'alter table %s add tag tgcol4 int'
%
(
mt
))
tdLog
.
info
(
'select * from %s where tgcol4=6'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol4=6'
%
(
mt
))
# TSIM: sql reset query cache
tdLog
.
info
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
...
...
tests/pytest/util/dnodes-no-random-fail.py
浏览文件 @
3d089318
...
...
@@ -178,7 +178,6 @@ class TDDnode:
self
.
cfg
(
"walLevel"
,
"2"
)
self
.
cfg
(
"fsync"
,
"1000"
)
self
.
cfg
(
"statusInterval"
,
"1"
)
self
.
cfg
(
"numOfTotalVnodes"
,
"64"
)
self
.
cfg
(
"numOfMnodes"
,
"3"
)
self
.
cfg
(
"numOfThreadsPerCore"
,
"2.0"
)
self
.
cfg
(
"monitor"
,
"0"
)
...
...
tests/pytest/util/dnodes-random-fail.py
浏览文件 @
3d089318
...
...
@@ -178,7 +178,6 @@ class TDDnode:
self
.
cfg
(
"walLevel"
,
"2"
)
self
.
cfg
(
"fsync"
,
"1000"
)
self
.
cfg
(
"statusInterval"
,
"1"
)
self
.
cfg
(
"numOfTotalVnodes"
,
"64"
)
self
.
cfg
(
"numOfMnodes"
,
"3"
)
self
.
cfg
(
"numOfThreadsPerCore"
,
"2.0"
)
self
.
cfg
(
"monitor"
,
"0"
)
...
...
tests/pytest/util/dnodes.py
浏览文件 @
3d089318
...
...
@@ -180,7 +180,6 @@ class TDDnode:
self
.
cfg
(
"walLevel"
,
"2"
)
self
.
cfg
(
"fsync"
,
"1000"
)
self
.
cfg
(
"statusInterval"
,
"1"
)
self
.
cfg
(
"numOfTotalVnodes"
,
"64"
)
self
.
cfg
(
"numOfMnodes"
,
"3"
)
self
.
cfg
(
"numOfThreadsPerCore"
,
"2.0"
)
self
.
cfg
(
"monitor"
,
"0"
)
...
...
tests/script/general/alter/cached_schema_after_alter.sim
浏览文件 @
3d089318
...
...
@@ -68,7 +68,7 @@ endi
if $data01 != 1 then
return -1
endi
if $data02 !=
NULL
then
if $data02 !=
1
then
return -1
endi
...
...
@@ -80,7 +80,7 @@ endi
if $data01 != 1 then
return -1
endi
if $data02 !=
NULL
then
if $data02 !=
1
then
return -1
endi
...
...
tests/script/general/db/alter_option.sim
浏览文件 @
3d089318
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 maxTablesPerVnode -v 1000
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/basic.sim
浏览文件 @
3d089318
...
...
@@ -99,9 +99,7 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
sql create database $db
sql use $db
sql create table $tb (ts timestamp, speed int) -x step6
return -1
step6:
sql create table $tb (ts timestamp, speed int)
print =============== step7
$i = 0
...
...
tests/script/general/db/delete.sim
浏览文件 @
3d089318
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 10
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 10
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 1000
...
...
tests/script/general/db/delete_reuse1.sim
浏览文件 @
3d089318
...
...
@@ -20,11 +20,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
...
...
tests/script/general/db/delete_reuse2.sim
浏览文件 @
3d089318
...
...
@@ -20,11 +20,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
sleep 2000
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/delete_reusevnode.sim
浏览文件 @
3d089318
...
...
@@ -2,10 +2,6 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
...
...
@@ -44,9 +40,6 @@ system sh/stop_dnodes.sh
sleep 3000
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect
...
...
tests/script/general/db/delete_reusevnode2.sim
浏览文件 @
3d089318
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/delete_writing1.sim
浏览文件 @
3d089318
...
...
@@ -20,11 +20,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
...
...
tests/script/general/db/delete_writing2.sim
浏览文件 @
3d089318
...
...
@@ -2,7 +2,6 @@ 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
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/len.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 2000
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/repeat.sim
浏览文件 @
3d089318
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 maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/db/vnodes.sim
浏览文件 @
3d089318
...
...
@@ -8,7 +8,6 @@ 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 maxTablesPerVnode -v $maxTables
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v $totalVnodes
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v $totalVnodes
system sh/cfg.sh -n dnode1 -c maxVnodeConnections -v 100000
system sh/cfg.sh -n dnode1 -c maxMeterConnections -v 100000
system sh/cfg.sh -n dnode1 -c maxShellConns -v 100000
...
...
tests/script/general/parser/bug.sim
浏览文件 @
3d089318
...
...
@@ -20,7 +20,6 @@ system sh/cfg.sh -n dnode1 -c maxVnodeConnections -v 30000
system sh/cfg.sh -n dnode1 -c maxMgmtConnections -v 30000
system sh/cfg.sh -n dnode1 -c maxMeterConnections -v 30000
system sh/cfg.sh -n dnode1 -c maxShellConns -v 30000
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 60
system sh/exec.sh -n dnode1 -s start
sql connect
...
...
tests/script/general/parser/select_across_vnodes.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 5
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
...
...
tests/script/general/parser/select_from_cache_disk.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
...
...
tests/script/general/parser/slimit.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
...
...
tests/script/general/parser/slimit1.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
...
...
tests/script/general/parser/slimit_alter_tags.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
...
...
tests/script/general/parser/timestamp.sim
浏览文件 @
3d089318
...
...
@@ -2,7 +2,6 @@ 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 8
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
...
...
tests/script/general/stable/disk.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/stable/dnode3.sim
浏览文件 @
3d089318
...
...
@@ -8,10 +8,6 @@ system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode2 -c walLevel -v 0
system sh/cfg.sh -n dnode3 -c walLevel -v 0
system sh/cfg.sh -n dnode4 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
...
...
tests/script/general/stable/metrics.sim
浏览文件 @
3d089318
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 maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/stable/refcount.sim
浏览文件 @
3d089318
...
...
@@ -2,7 +2,6 @@ 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 maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/stable/show.sim
浏览文件 @
3d089318
...
...
@@ -2,7 +2,6 @@ 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/exec.sh -n dnode1 -s start
sleep 3000
...
...
tests/script/general/stable/values.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/stable/vnode3.sim
浏览文件 @
3d089318
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 maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/stream/metrics_replica1_vnoden.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 8
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 1000
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 3
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/stream/table_replica1_vnoden.sim
浏览文件 @
3d089318
...
...
@@ -3,7 +3,6 @@ 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 8
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 1000
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 3
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/table/delete_reuse1.sim
浏览文件 @
3d089318
...
...
@@ -19,11 +19,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/table/delete_reuse2.sim
浏览文件 @
3d089318
...
...
@@ -19,11 +19,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/table/delete_writing.sim
浏览文件 @
3d089318
...
...
@@ -19,11 +19,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/table/limit.sim
浏览文件 @
3d089318
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 8
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 129
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 8
system sh/exec.sh -n dnode1 -s start
...
...
tests/script/general/table/vgroup.sim
浏览文件 @
3d089318
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
maxVgroupsPerDb
-v 4
system sh/exec.sh -n dnode1 -s start
sleep 3000
...
...
@@ -78,10 +78,6 @@ if $rows != 0 then
return -1
endi
sql create table table1 (ts timestamp, speed int) -x error2
return -1
error2:
$i = 0
$db = $dbPrefix . $i
sql drop database $db
...
...
@@ -134,9 +130,6 @@ $i = 4
$db = $dbPrefix . $i
sql create database $db
sql use $db
sql create table table5 (ts timestamp, speed int) -x error3
return -1
error3:
sql show databases
if $rows != 5 then
...
...
tests/script/sh/clear.sh
浏览文件 @
3d089318
...
...
@@ -122,7 +122,6 @@ echo "numOfLogLines 100000000" >> $TAOS_CFG
echo
"mnodeEqualVnodeNum 0"
>>
$TAOS_CFG
echo
"clog 0"
>>
$TAOS_CFG
echo
"statusInterval 1"
>>
$TAOS_CFG
echo
"numOfTotalVnodes 4"
>>
$TAOS_CFG
echo
"asyncLog 0"
>>
$TAOS_CFG
echo
"numOfMnodes 1"
>>
$TAOS_CFG
echo
"locale en_US.UTF-8"
>>
$TAOS_CFG
...
...
tests/script/sh/deploy.sh
浏览文件 @
3d089318
...
...
@@ -139,7 +139,6 @@ echo "clog 2" >> $TAOS_CFG
#echo "cache 1" >> $TAOS_CFG
#echo "block 2" >> $TAOS_CFG
echo
"statusInterval 1"
>>
$TAOS_CFG
echo
"numOfTotalVnodes 4"
>>
$TAOS_CFG
echo
"maxVgroupsPerDb 4"
>>
$TAOS_CFG
echo
"minTablesPerVnode 4"
>>
$TAOS_CFG
echo
"maxTablesPerVnode 1000"
>>
$TAOS_CFG
...
...
tests/script/tmp/http.sim
浏览文件 @
3d089318
...
...
@@ -20,11 +20,6 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c http -v 1
system sh/cfg.sh -n dnode2 -c http -v 1
system sh/cfg.sh -n dnode3 -c http -v 1
...
...
tests/script/tmp/mnodes.sim
浏览文件 @
3d089318
...
...
@@ -16,10 +16,6 @@ system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 20
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 20
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 20
system sh/cfg.sh -n dnode1 -c http -v 1
system sh/cfg.sh -n dnode2 -c http -v 1
system sh/cfg.sh -n dnode3 -c http -v 1
...
...
tests/script/unique/account/authority.sim
浏览文件 @
3d089318
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 8
system sh/exec.sh -n dnode1 -s start
sleep 3000
...
...
tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim
浏览文件 @
3d089318
...
...
@@ -29,15 +29,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
...
...
tests/script/unique/arbitrator/dn3_mn1_full_createTableFail.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
...
...
tests/script/unique/arbitrator/dn3_mn1_full_dropDnodeFail.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
...
...
tests/script/unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
浏览文件 @
3d089318
...
...
@@ -19,20 +19,15 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
alternativeR
ole -v 1
system sh/cfg.sh -n dnode2 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode3 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode4 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode1 -c
r
ole -v 1
system sh/cfg.sh -n dnode2 -c
r
ole -v 2
system sh/cfg.sh -n dnode3 -c
r
ole -v 2
system sh/cfg.sh -n dnode4 -c
r
ole -v 2
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
...
...
tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
浏览文件 @
3d089318
...
...
@@ -29,12 +29,6 @@ system sh/cfg.sh -n dnode3 -c maxVgroupsPerDb -v 16
system sh/cfg.sh -n dnode4 -c maxVgroupsPerDb -v 16
system sh/cfg.sh -n dnode5 -c maxVgroupsPerDb -v 16
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
...
...
@@ -47,11 +41,11 @@ system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 200
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 200
system sh/cfg.sh -n dnode5 -c mnodeEqualVnodeNum -v 200
system sh/cfg.sh -n dnode1 -c
alternativeR
ole -v 1
system sh/cfg.sh -n dnode2 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode3 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode4 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode5 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode1 -c
r
ole -v 1
system sh/cfg.sh -n dnode2 -c
r
ole -v 2
system sh/cfg.sh -n dnode3 -c
r
ole -v 2
system sh/cfg.sh -n dnode4 -c
r
ole -v 2
system sh/cfg.sh -n dnode5 -c
r
ole -v 2
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
...
...
@@ -214,10 +208,9 @@ system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c walLevel -v 1
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 200
system sh/cfg.sh -n dnode3 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode3 -c
r
ole -v 2
system sh/cfg.sh -n dnode3 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode3 -c enableCoreFile -v 1
...
...
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
浏览文件 @
3d089318
...
...
@@ -19,20 +19,16 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode1 -c
alternativeR
ole -v 1
system sh/cfg.sh -n dnode2 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode3 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode4 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode1 -c
r
ole -v 1
system sh/cfg.sh -n dnode2 -c
r
ole -v 2
system sh/cfg.sh -n dnode3 -c
r
ole -v 2
system sh/cfg.sh -n dnode4 -c
r
ole -v 2
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
...
...
@@ -178,9 +174,8 @@ system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c walLevel -v 1
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c
alternativeR
ole -v 2
system sh/cfg.sh -n dnode4 -c
r
ole -v 2
system sh/cfg.sh -n dnode4 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode4 -c offlineThreshold -v 5
system sh/cfg.sh -n dnode4 -c enableCoreFile -v 1
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
...
...
tests/script/unique/arbitrator/dn3_mn2_killDnode.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
#system sh/cfg.sh -n dnode1 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode1 -c role -v 2
#system sh/cfg.sh -n dnode2 -c role -v 2
#system sh/cfg.sh -n dnode3 -c role -v 2
#system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
...
...
tests/script/unique/arbitrator/insert_duplicationTs.sim
浏览文件 @
3d089318
...
...
@@ -29,15 +29,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
...
...
tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
#system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
#system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
#system sh/cfg.sh -n dnode1 -c role -v 1
#system sh/cfg.sh -n dnode2 -c role -v 2
#system sh/cfg.sh -n dnode3 -c role -v 2
#system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/offline_replica2_createTable_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 20
...
...
tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim
浏览文件 @
3d089318
...
...
@@ -19,10 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
#system sh/cfg.sh -n dnode1 -c
alternativeR
ole -v 1
#system sh/cfg.sh -n dnode2 -c
alternativeR
ole -v 2
#system sh/cfg.sh -n dnode3 -c
alternativeR
ole -v 2
#system sh/cfg.sh -n dnode4 -c
alternativeR
ole -v 2
#system sh/cfg.sh -n dnode1 -c
r
ole -v 1
#system sh/cfg.sh -n dnode2 -c
r
ole -v 2
#system sh/cfg.sh -n dnode3 -c
r
ole -v 2
#system sh/cfg.sh -n dnode4 -c
r
ole -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 20
...
...
tests/script/unique/arbitrator/offline_replica3_createTable_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 20
...
...
tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/replica_changeWithArbitrator.sim
浏览文件 @
3d089318
...
...
@@ -19,20 +19,15 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 8
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c
alternativeR
ole -v 0
system sh/cfg.sh -n dnode2 -c
alternativeR
ole -v 0
system sh/cfg.sh -n dnode3 -c
alternativeR
ole -v 0
system sh/cfg.sh -n dnode4 -c
alternativeR
ole -v 0
system sh/cfg.sh -n dnode1 -c
r
ole -v 0
system sh/cfg.sh -n dnode2 -c
r
ole -v 0
system sh/cfg.sh -n dnode3 -c
r
ole -v 0
system sh/cfg.sh -n dnode4 -c
r
ole -v 0
$totalTableNum = 12
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
@@ -150,8 +145,8 @@ system sh/cfg.sh -n dnode2 -c numOfMnodes -v 2
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c
alternativeR
ole -v 1
system sh/cfg.sh -n dnode2 -c
alternativeR
ole -v 0
system sh/cfg.sh -n dnode1 -c
r
ole -v 1
system sh/cfg.sh -n dnode2 -c
r
ole -v 0
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
...
...
tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim
浏览文件 @
3d089318
...
...
@@ -19,15 +19,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c alternativeRole -v 1
system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
$totalTableNum = 10
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
...
...
tests/script/unique/arbitrator/sync_replica2_dropDb.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica2_dropTable.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica3_createTable.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica3_dropDb.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/arbitrator/sync_replica3_dropTable.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/big/balance.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/big/maxvnodes.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/big/restartSpeed.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/balance1.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/balance2.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/balance3.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/client1_0.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/cluster_main.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/cluster_main0.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/cluster_main1.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/cluster_main2.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/main1_client1_0.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/cluster/main2_client1_0.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/delete.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/delete_part.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_add12.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_add13.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_add23.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_part.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_reduce21.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_reduce31.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/db/replica_reduce32.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/dnode/alternativeRole.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/balance_replica1.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/dnode2.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/dnode2_stop.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/dnode3.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/replica2_dnode4.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/replica2_vnode3.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/replica3_dnode6.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stable/replica3_vnode3.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_balance.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica1_dnode2.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica2_dnode3.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/metrics_replica3_dnode4.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_balance.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_move.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica1_dnode2.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica2_dnode2_vnoden.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica2_dnode3.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/stream/table_replica3_dnode4.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/vnode/many.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/script/unique/vnode/replica2_basic2.sim
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
tests/tsim/src/simExe.c
浏览文件 @
3d089318
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录