Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
7376933e
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
7376933e
编写于
11月 18, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
11月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4281 from taosdata/feature/wal
Feature/wal
上级
0f0412cf
3acab9b5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
123 addition
and
11 deletion
+123
-11
src/plugins/monitor/src/monitorMain.c
src/plugins/monitor/src/monitorMain.c
+4
-2
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+2
-0
tests/script/unique/dnode/monitor.sim
tests/script/unique/dnode/monitor.sim
+92
-0
tests/script/unique/dnode/monitor_bug.sim
tests/script/unique/dnode/monitor_bug.sim
+25
-9
未找到文件。
src/plugins/monitor/src/monitorMain.c
浏览文件 @
7376933e
...
@@ -148,10 +148,12 @@ static void *monitorThreadFunc(void *param) {
...
@@ -148,10 +148,12 @@ static void *monitorThreadFunc(void *param) {
}
}
if
(
tsMonitor
.
state
==
MON_STATE_NOT_INIT
)
{
if
(
tsMonitor
.
state
==
MON_STATE_NOT_INIT
)
{
int
code
=
0
;
for
(;
tsMonitor
.
cmdIndex
<
MON_CMD_MAX
;
++
tsMonitor
.
cmdIndex
)
{
for
(;
tsMonitor
.
cmdIndex
<
MON_CMD_MAX
;
++
tsMonitor
.
cmdIndex
)
{
monitorBuildMonitorSql
(
tsMonitor
.
sql
,
tsMonitor
.
cmdIndex
);
monitorBuildMonitorSql
(
tsMonitor
.
sql
,
tsMonitor
.
cmdIndex
);
void
*
res
=
taos_query
(
tsMonitor
.
conn
,
tsMonitor
.
sql
);
void
*
res
=
taos_query
(
tsMonitor
.
conn
,
tsMonitor
.
sql
);
int
code
=
taos_errno
(
res
);
code
=
taos_errno
(
res
);
taos_free_result
(
res
);
taos_free_result
(
res
);
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
...
@@ -162,7 +164,7 @@ static void *monitorThreadFunc(void *param) {
...
@@ -162,7 +164,7 @@ static void *monitorThreadFunc(void *param) {
}
}
}
}
if
(
tsMonitor
.
start
)
{
if
(
tsMonitor
.
start
&&
code
==
0
)
{
tsMonitor
.
state
=
MON_STATE_INITED
;
tsMonitor
.
state
=
MON_STATE_INITED
;
}
}
}
}
...
...
tests/script/jenkins/basic.txt
浏览文件 @
7376933e
...
@@ -277,6 +277,8 @@ cd ../../../debug; make
...
@@ -277,6 +277,8 @@ cd ../../../debug; make
./test.sh -f unique/db/replica_part.sim
./test.sh -f unique/db/replica_part.sim
./test.sh -f unique/dnode/alternativeRole.sim
./test.sh -f unique/dnode/alternativeRole.sim
./test.sh -f unique/dnode/monitor.sim
./test.sh -f unique/dnode/monitor_bug.sim
./test.sh -f unique/dnode/simple.sim
./test.sh -f unique/dnode/simple.sim
./test.sh -f unique/dnode/balance1.sim
./test.sh -f unique/dnode/balance1.sim
./test.sh -f unique/dnode/balance2.sim
./test.sh -f unique/dnode/balance2.sim
...
...
tests/script/unique/dnode/monitor.sim
0 → 100644
浏览文件 @
7376933e
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 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 dnode1 -c wallevel -v 1
system sh/cfg.sh -n dnode2 -c wallevel -v 1
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c minTablesPerVnode -v 10
system sh/cfg.sh -n dnode2 -c minTablesPerVnode -v 10
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 10
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 10
system sh/cfg.sh -n dnode1 -c monitor -v 1
system sh/cfg.sh -n dnode2 -c monitor -v 1
print ========== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 5000
sql show dnodes
print dnode1 openVnodes $data3_1
if $data2_1 != 0 then
return -1
endi
print ========== step2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 10000
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
if $data2_1 != 0 then
return -1
endi
if $data2_2 != 1 then
return -1
endi
print ========== step3
sql show log.tables
print $data00
print $data10
print $data20
print $data30
print $data40
print $data50
if $rows != 5 then
return -1
endi
print ========== step4
sql select * from log.dn1
print $rows
$rows1 = $rows
sleep 3000
sql select * from log.dn1
print $rows
$rows2 = $rows
if $rows2 <= $rows1 then
return -1
endi
print ========== step5
sql select * from log.dn2
print $rows
$rows1 = $rows
sleep 3000
sql select * from log.dn2
print $rows
$rows2 = $rows
if $rows2 <= $rows1 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
tests/script/unique/dnode/monitor_bug.sim
浏览文件 @
7376933e
...
@@ -18,8 +18,8 @@ sql connect
...
@@ -18,8 +18,8 @@ sql connect
sleep 5000
sleep 5000
sql show dnodes
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode1 openVnodes $data
2
_1
if $data
3_1 != 3
then
if $data
2_1 != 1
then
return -1
return -1
endi
endi
...
@@ -31,22 +31,21 @@ $x = 0
...
@@ -31,22 +31,21 @@ $x = 0
show2:
show2:
$x = $x + 1
$x = $x + 1
sleep 2000
sleep 2000
if $x ==
3
0 then
if $x ==
1
0 then
return -1
return -1
endi
endi
sql show dnodes
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
3
_2
print dnode2 openVnodes $data
2
_2
if $data
3_1 != 4
then
if $data
2_1 != 0
then
goto show2
goto show2
endi
endi
if $data
3_2 != 3
then
if $data
2_2 != 1
then
goto show2
goto show2
endi
endi
print ========== step3
print ========== step3
sleep 3000
sql show log.tables
sql show log.tables
print $data00
print $data00
...
@@ -56,6 +55,23 @@ print $data30
...
@@ -56,6 +55,23 @@ print $data30
print $data40
print $data40
print $data50
print $data50
if $rows != 5 then
if $rows != 4 then
return -1
endi
print ========== step4
sql select * from log.dn1
print $rows
$rows1 = $rows
sleep 3000
sql select * from log.dn1
print $rows
$rows2 = $rows
if $rows2 <= $rows1 then
return -1
return -1
endi
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录