Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
0e2a548e
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看板
提交
0e2a548e
编写于
12月 30, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2602
上级
44b17042
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
83 addition
and
1 deletion
+83
-1
src/mnode/src/mnodeCluster.c
src/mnode/src/mnodeCluster.c
+1
-1
src/mnode/src/mnodeMnode.c
src/mnode/src/mnodeMnode.c
+1
-0
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+4
-0
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
tests/script/jenkins/unique.txt
tests/script/jenkins/unique.txt
+8
-0
tests/script/unique/mnode/mgmt30.sim
tests/script/unique/mnode/mgmt30.sim
+68
-0
未找到文件。
src/mnode/src/mnodeCluster.c
浏览文件 @
0e2a548e
...
...
@@ -171,7 +171,7 @@ void mnodeUpdateClusterId() {
void
*
pIter
=
mnodeGetNextCluster
(
NULL
,
&
pCluster
);
if
(
pCluster
!=
NULL
)
{
tstrncpy
(
tsClusterId
,
pCluster
->
uid
,
TSDB_CLUSTER_ID_LEN
);
m
Info
(
"cluster id is set to %s"
,
tsClusterId
);
m
Debug
(
"cluster id is set to %s"
,
tsClusterId
);
}
mnodeDecClusterRef
(
pCluster
);
...
...
src/mnode/src/mnodeMnode.c
浏览文件 @
0e2a548e
...
...
@@ -387,6 +387,7 @@ static bool mnodeAllOnline() {
if
(
pMnode
==
NULL
)
break
;
if
(
pMnode
->
role
!=
TAOS_SYNC_ROLE_MASTER
&&
pMnode
->
role
!=
TAOS_SYNC_ROLE_SLAVE
)
{
allOnline
=
false
;
mDebug
(
"mnode:%d, role:%s, not online"
,
pMnode
->
mnodeId
,
syncRole
[
pMnode
->
role
]);
mnodeDecMnodeRef
(
pMnode
);
}
}
...
...
src/mnode/src/mnodeSdb.c
浏览文件 @
0e2a548e
...
...
@@ -225,6 +225,10 @@ void sdbUpdateMnodeRoles() {
for
(
int32_t
i
=
0
;
i
<
tsSdbMgmt
.
cfg
.
replica
;
++
i
)
{
SMnodeObj
*
pMnode
=
mnodeGetMnode
(
roles
.
nodeId
[
i
]);
if
(
pMnode
!=
NULL
)
{
if
(
pMnode
->
role
!=
roles
.
role
[
i
])
{
bnNotify
();
}
pMnode
->
role
=
roles
.
role
[
i
];
sdbInfo
(
"vgId:1, mnode:%d, role:%s"
,
pMnode
->
mnodeId
,
syncRole
[
pMnode
->
role
]);
if
(
pMnode
->
mnodeId
==
dnodeGetDnodeId
())
tsSdbMgmt
.
role
=
pMnode
->
role
;
...
...
tests/script/jenkins/basic.txt
浏览文件 @
0e2a548e
...
...
@@ -319,6 +319,7 @@ cd ../../../debug; make
./test.sh -f unique/mnode/mgmt24.sim
./test.sh -f unique/mnode/mgmt25.sim
./test.sh -f unique/mnode/mgmt26.sim
./test.sh -f unique/mnode/mgmt30.sim
./test.sh -f unique/mnode/mgmt33.sim
./test.sh -f unique/mnode/mgmt34.sim
./test.sh -f unique/mnode/mgmtr2.sim
...
...
tests/script/jenkins/unique.txt
浏览文件 @
0e2a548e
...
...
@@ -10,6 +10,7 @@ cd ../../../debug; make
./test.sh -f unique/cluster/balance2.sim
./test.sh -f unique/cluster/balance3.sim
./test.sh -f unique/cluster/cache.sim
./test.sh -f unique/cluster/vgroup100.sim
./test.sh -f unique/column/replica3.sim
...
...
@@ -25,12 +26,17 @@ cd ../../../debug; make
./test.sh -f unique/db/replica_part.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/balance1.sim
./test.sh -f unique/dnode/balance2.sim
./test.sh -f unique/dnode/balance3.sim
./test.sh -f unique/dnode/balancex.sim
./test.sh -f unique/dnode/data1.sim
./test.sh -f unique/dnode/m2.sim
./test.sh -f unique/dnode/m3.sim
./test.sh -f unique/dnode/lossdata.sim
./test.sh -f unique/dnode/offline1.sim
./test.sh -f unique/dnode/offline2.sim
./test.sh -f unique/dnode/offline3.sim
...
...
@@ -54,12 +60,14 @@ cd ../../../debug; make
./test.sh -f unique/stable/replica3_dnode6.sim
./test.sh -f unique/stable/replica3_vnode3.sim
./test.sh -f unique/mnode/mgmt20.sim
./test.sh -f unique/mnode/mgmt21.sim
./test.sh -f unique/mnode/mgmt22.sim
./test.sh -f unique/mnode/mgmt23.sim
./test.sh -f unique/mnode/mgmt24.sim
./test.sh -f unique/mnode/mgmt25.sim
./test.sh -f unique/mnode/mgmt26.sim
./test.sh -f unique/mnode/mgmt30.sim
./test.sh -f unique/mnode/mgmt33.sim
./test.sh -f unique/mnode/mgmt34.sim
./test.sh -f unique/mnode/mgmtr2.sim
...
...
tests/script/unique/mnode/mgmt30.sim
0 → 100644
浏览文件 @
0e2a548e
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
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 dnode3 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c balanceInterval -v 3000
system sh/cfg.sh -n dnode2 -c balanceInterval -v 3000
system sh/cfg.sh -n dnode3 -c balanceInterval -v 3000
print ============== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode3 ==> $data3_3
if $data2_1 != master then
return -1
endi
if $data3_2 != null then
return -1
endi
if $data3_3 != null then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
sql create dnode $hostname2
sql create dnode $hostname3
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode3Role = $data2_3
print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
goto step2
endi
if $dnode2Role != slave then
goto step2
endi
if $dnode3Role != slave then
goto step2
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录