Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
91659c8c
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
91659c8c
编写于
8月 25, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: make uptimeInterval can be configured
上级
4c280dc2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
130 addition
and
7 deletion
+130
-7
source/common/src/tglobal.c
source/common/src/tglobal.c
+2
-0
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+1
-1
tests/script/tmp/monitor.sim
tests/script/tmp/monitor.sim
+2
-1
tests/script/tsim/user/privilege_sysinfo.sim
tests/script/tsim/user/privilege_sysinfo.sim
+125
-5
未找到文件。
source/common/src/tglobal.c
浏览文件 @
91659c8c
...
...
@@ -420,6 +420,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if
(
cfgAddInt32
(
pCfg
,
"mqRebalanceInterval"
,
tsMqRebalanceInterval
,
1
,
10000
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"ttlUnit"
,
tsTtlUnit
,
1
,
86400
*
365
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"ttlPushInterval"
,
tsTtlPushInterval
,
1
,
100000
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"uptimeInterval"
,
tsUptimeInterval
,
1
,
100000
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"udf"
,
tsStartUdfd
,
0
)
!=
0
)
return
-
1
;
GRANT_CFG_ADD
;
...
...
@@ -567,6 +568,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsMqRebalanceInterval
=
cfgGetItem
(
pCfg
,
"mqRebalanceInterval"
)
->
i32
;
tsTtlUnit
=
cfgGetItem
(
pCfg
,
"ttlUnit"
)
->
i32
;
tsTtlPushInterval
=
cfgGetItem
(
pCfg
,
"ttlPushInterval"
)
->
i32
;
tsUptimeInterval
=
cfgGetItem
(
pCfg
,
"uptimeInterval"
)
->
i32
;
tsStartUdfd
=
cfgGetItem
(
pCfg
,
"udf"
)
->
bval
;
...
...
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
91659c8c
...
...
@@ -132,7 +132,7 @@ static void *mndThreadFp(void *param) {
mndCalMqRebalance
(
pMnode
);
}
if
(
lastTime
%
(
tsTelemInterval
*
10
)
==
1
)
{
if
(
lastTime
%
(
tsTelemInterval
*
10
)
==
((
tsTelemInterval
-
1
)
*
10
)
)
{
mndPullupTelem
(
pMnode
);
}
...
...
tests/script/tmp/monitor.sim
浏览文件 @
91659c8c
...
...
@@ -4,6 +4,7 @@ system sh/cfg.sh -n dnode1 -c monitorfqdn -v localhost
system sh/cfg.sh -n dnode1 -c monitorport -v 80
system sh/cfg.sh -n dnode1 -c monitorInterval -v 1
system sh/cfg.sh -n dnode1 -c monitorComp -v 1
system sh/cfg.sh -n dnode1 -c uptimeInterval -v 3
#system sh/cfg.sh -n dnode1 -c supportVnodes -v 128
#system sh/cfg.sh -n dnode1 -c telemetryReporting -v 1
...
...
@@ -14,7 +15,7 @@ system sh/cfg.sh -n dnode1 -c monitorComp -v 1
system sh/exec.sh -n dnode1 -s start
sql connect
print ===============
select * from information_schema.ins_dnodes
print ===============
create database
sql create database db vgroups 2;
sql use db;
sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 binary(16)) comment "abd";
...
...
tests/script/tsim/user/privilege_sysinfo.sim
浏览文件 @
91659c8c
...
...
@@ -8,7 +8,20 @@ sql create user sysinfo0 pass 'taosdata'
sql create user sysinfo1 pass 'taosdata'
sql alter user sysinfo0 sysinfo 0
sql alter user sysinfo1 sysinfo 1
sql create database db
sql use db
sql create table db.stb (ts timestamp, i int) tags (t int)
sql create table db.ctb using db.stb tags (1)
sql create table db.ntb (ts timestamp, i int)
sql insert into db.ctb values (now, 1);
sql insert into db.ntb values (now, 1);
sql select * from db.stb
sql select * from db.ctb
sql select * from db.ntb
sql create database d2
sql GRANT all ON d2.* to sysinfo0;
print user sysinfo0 login
sql close
...
...
@@ -17,11 +30,31 @@ sql connect sysinfo0
print =============== check oper
sql_error create user u1 pass 'u1'
sql_error drop user sysinfo1
sql_error alter user sysinfo1 pass '1'
sql_error alter user sysinfo0 pass '1'
sql_error alter user sysinfo0 enable 0
sql_error alter user sysinfo0 enable 1
sql_error alter user sysinfo1 pass '1'
sql_error alter user sysinfo1 enable 1
sql_error alter user sysinfo1 enable 1
sql_error GRANT read ON db.* to sysinfo0;
sql_error GRANT read ON *.* to sysinfo0;
sql_error REVOKE read ON db.* from sysinfo0;
sql_error REVOKE read ON *.* from sysinfo0;
sql_error GRANT write ON db.* to sysinfo0;
sql_error GRANT write ON *.* to sysinfo0;
sql_error REVOKE write ON db.* from sysinfo0;
sql_error REVOKE write ON *.* from sysinfo0;
sql_error REVOKE write ON *.* from sysinfo0;
sql_error create dnode $hostname port 7200
sql_error drop dnode 1
sql_error alter dnode 1 'debugFlag 135'
sql_error alter dnode 1 'dDebugFlag 131'
sql_error alter dnode 1 'resetlog'
sql_error alter dnode 1 'monitor' '1'
sql_error alter dnode 1 'monitor' '0'
sql_error alter dnode 1 'monitor 1'
sql_error alter dnode 1 'monitor 0'
sql_error create qnode on dnode 1
sql_error drop qnode on dnode 1
...
...
@@ -44,20 +77,107 @@ sql_error create database d1
sql_error drop database db
sql_error use db
sql_error alter database db replica 1;
sql_error alter database db keep 21
sql_error show db.vgroups
sql select * from information_schema.ins_stables where db_name = 'db'
sql select * from information_schema.ins_tables where db_name = 'db'
sql_error create table db.stb1 (ts timestamp, i int) tags (t int)
sql_error create table db.ctb1 using db.stb1 tags (1)
sql_error create table db.ntb1 (ts timestamp, i int)
sql_error insert into db.ctb values (now, 1);
sql_error insert into db.ntb values (now, 1);
sql_error select * from db.stb
sql_error select * from db.ctb
sql_error select * from db.ntb
sql use d2
sql create table d2.stb2 (ts timestamp, i int) tags (t int)
sql create table d2.ctb2 using d2.stb2 tags (1)
sql create table d2.ntb2 (ts timestamp, i int)
sql insert into d2.ctb2 values (now, 1);
sql insert into d2.ntb2 values (now, 1);
sql select * from d2.stb2
sql select * from d2.ctb2
sql select * from d2.ntb2
print =============== check show
sql
select * from information_schema.ins_
users
sql
_error show
users
sql_error show cluster
sql_error select * from information_schema.ins_dnodes
sql_error select * from information_schema.ins_mnodes
sql_error show snodes
sql_error select * from information_schema.ins_qnodes
sql_error show dnodes
sql_error show snodes
sql_error show qnodes
sql_error show mnodes
sql_error show bnodes
sql_error show db.vgroups
sql_error show db.stables
sql_error show db.tables
sql_error show indexes from stb from db
sql show databases
sql_error show d2.vgroups
sql show d2.stables
sql show d2.tables
sql show indexes from stb2 from d2
#sql_error show create database db
sql_error show create table db.stb;
sql_error show create table db.ctb;
sql_error show create table db.ntb;
sql show streams
sql show consumers
sql show topics
sql show subscriptions
sql show functions
sql_error show grants
sql show queries
sql show connections
sql show apps
sql_error show transactions
#sql_error show create database d2
sql show create table d2.stb2;
sql show create table d2.ctb2;
sql show create table d2.ntb2;
sql_error show variables;
sql show local variables;
sql_error show dnode 1 variables;
sql_error show variables;
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check information_schema
sql show databases
if $rows != 3 then
return -1
endi
sql use information_schema;
sql_error select * from information_schema.ins_dnodes
sql_error select * from information_schema.ins_mnodes
sql_error select * from information_schema.ins_modules
sql_error select * from information_schema.ins_qnodes
sql_error select * from information_schema.ins_cluster
sql select * from information_schema.ins_databases
sql select * from information_schema.ins_functions
sql select * from information_schema.ins_indexes
sql select * from information_schema.ins_stables
sql select * from information_schema.ins_tables
sql select * from information_schema.ins_tags
sql select * from information_schema.ins_users
sql_error select * from information_schema.ins_grants
sql_error select * from information_schema.ins_vgroups
sql_error select * from information_schema.ins_configs
sql_error select * from information_schema.ins_dnode_variables
print =============== check performance_schema
sql use performance_schema;
sql select * from performance_schema.perf_connections
sql select * from performance_schema.perf_queries
sql select * from performance_schema.perf_topics
sql select * from performance_schema.perf_consumers
sql select * from performance_schema.perf_subscriptions
#sql_error select * from performance_schema.perf_trans
#sql_error select * from performance_schema.perf_smas
#sql_error select * from information_schema.perf_streams
#sql_error select * from information_schema.perf_apps
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录