未验证 提交 0c3c75bc 编写于 作者: W wade zhang 提交者: GitHub

Merge pull request #14194 from taosdata/enh/dingbo/TD-16753-2.4

enh: change master/slave to leader/follower
......@@ -703,8 +703,8 @@ static int32_t monBuildMnodesTotalSql(char *sql) {
for (int i = 0; i < num_fields; ++i) {
if (strcmp(fields[i].name, "role") == 0) {
int32_t charLen = monGetRowElemCharLen(fields[i], (char *)row[i]);
if (strncmp((char *)row[i], "master", charLen) == 0 ||
strncmp((char *)row[i], "slave", charLen) == 0) {
if (strncmp((char *)row[i], "leader", charLen) == 0 ||
strncmp((char *)row[i], "follower", charLen) == 0) {
totalMnodesAlive += 1;
}
}
......@@ -794,8 +794,8 @@ static int32_t monGetVnodesTotalStats(char *ep, int32_t *totalVnodes,
for (int i = 0; i < num_fields; ++i) {
if (strcmp(fields[i].name, "status") == 0) {
int32_t charLen = monGetRowElemCharLen(fields[i], (char *)row[i]);
if (strncmp((char *)row[i], "master", charLen) == 0 ||
strncmp((char *)row[i], "slave", charLen) == 0) {
if (strncmp((char *)row[i], "leader", charLen) == 0 ||
strncmp((char *)row[i], "follower", charLen) == 0) {
*totalVnodesAlive += 1;
}
}
......
......@@ -68,8 +68,8 @@ char* syncRole[] = {
"offline",
"unsynced",
"syncing",
"slave",
"master"
"follower",
"leader"
};
char *syncStatus[] = {
......
......@@ -49,7 +49,7 @@ class TDTestCase:
ret = tdSql.query('show mnodes')
tdSql.checkRows(1)
tdSql.checkData(0, 2, "master")
tdSql.checkData(0, 2, "leader")
role_time = tdSql.getData(0, 3)
create_time = tdSql.getData(0, 4)
......@@ -72,7 +72,7 @@ class TDTestCase:
ret = tdSql.query('show vnodes "{}"'.format(dnodeEndpoint))
tdSql.checkRows(1)
tdSql.checkData(0, 0, 2)
tdSql.checkData(0, 1, "master")
tdSql.checkData(0, 1, "leader")
def stop(self):
tdSql.close()
......
......@@ -30,22 +30,22 @@ class ClusterTestcase:
tdSql.execute("use %s" % ctest.dbName)
tdSql.query("show vgroups")
for i in range(10):
tdSql.checkData(i, 5, "master")
tdSql.checkData(i, 5, "leader")
tdSql.execute("alter database %s replica 2" % ctest.dbName)
tdLog.sleep(30)
tdSql.query("show vgroups")
for i in range(10):
tdSql.checkData(i, 5, "master")
tdSql.checkData(i, 7, "slave")
tdSql.checkData(i, 5, "leader")
tdSql.checkData(i, 7, "follower")
tdSql.execute("alter database %s replica 3" % ctest.dbName)
tdLog.sleep(30)
tdSql.query("show vgroups")
for i in range(10):
tdSql.checkData(i, 5, "master")
tdSql.checkData(i, 7, "slave")
tdSql.checkData(i, 9, "slave")
tdSql.checkData(i, 5, "leader")
tdSql.checkData(i, 7, "follower")
tdSql.checkData(i, 9, "follower")
ct = ClusterTestcase()
ct.run()
\ No newline at end of file
......@@ -53,7 +53,7 @@ class TwoClients:
tdSql.query("show mnodes")
tdSql.checkRows(3)
roles = "master slave"
roles = "leader follower"
for i in range(tdSql.queryRows):
if (tdSql.queryResult[i][2] in roles ):
ep = tdSql.queryResult[i][1]
......
......@@ -109,7 +109,7 @@ sql show mnodes -x step1
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step2
endi
......@@ -186,7 +186,7 @@ sql show mnodes -x step3
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step3
endi
......@@ -323,7 +323,7 @@ sql show mnodes -x step9
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step9
endi
......@@ -419,7 +419,7 @@ sql show mnodes -x step10
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step10
endi
......@@ -482,7 +482,7 @@ sql show mnodes -x step1xx
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1xx
endi
......
......@@ -62,7 +62,7 @@ sql show mnodes -x step2
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step2
endi
......@@ -115,7 +115,7 @@ sql show mnodes -x step5
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step5
endi
......@@ -185,7 +185,7 @@ sql show mnodes -x step7
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step7
endi
......@@ -240,7 +240,7 @@ sql show mnodes -x step9
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step9
endi
......@@ -314,7 +314,7 @@ sql show mnodes -x step10
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step10
endi
......@@ -369,7 +369,7 @@ sql show mnodes -x step12
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step12
endi
......
......@@ -81,7 +81,7 @@ sql show mnodes -x step3
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step3
endi
......@@ -155,7 +155,7 @@ sql show mnodes -x step5
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step5
endi
......@@ -287,7 +287,7 @@ sql show mnodes -x step9
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step9
endi
......@@ -381,7 +381,7 @@ sql show mnodes -x step10
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step10
endi
......@@ -441,7 +441,7 @@ sql show mnodes -x step12
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step12
endi
......
......@@ -57,7 +57,7 @@ step3:
sql show mnodes
print dnode1 role $data2_1
if $data2_1 != master then
if $data2_1 != leader then
goto step3
endi
......
......@@ -54,13 +54,13 @@ print mnode2Role $mnode2Role
$mnode3Role = $data2_3
print mnode3Role $mnode3Role
if $mnode1Role != master then
if $mnode1Role != leader then
goto show1
endi
if $mnode2Role != slave then
if $mnode2Role != follower then
goto show1
endi
if $mnode3Role != slave then
if $mnode3Role != follower then
goto show1
endi
......
......@@ -54,13 +54,13 @@ print mnode2Role $mnode2Role
$mnode3Role = $data2_3
print mnode3Role $mnode3Role
if $mnode1Role != master then
if $mnode1Role != leader then
goto step1
endi
if $mnode2Role != slave then
if $mnode2Role != follower then
goto step1
endi
if $mnode3Role != slave then
if $mnode3Role != follower then
goto step1
endi
......
......@@ -67,7 +67,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -60,13 +60,13 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto step1
endi
if $data2_3 != slave then
if $data2_3 != follower then
goto step1
endi
......
......@@ -76,10 +76,10 @@ endi
if $data06 != 2 then
return -1
endi
if $data05 != master then
if $data05 != leader then
return -1
endi
if $data07 != slave then
if $data07 != follower then
return -1
endi
......@@ -125,10 +125,10 @@ endi
if $data06 != 2 then
goto step4
endi
if $data05 != master then
if $data05 != leader then
goto step4
endi
if $data07 != slave then
if $data07 != follower then
goto step4
endi
......@@ -189,7 +189,7 @@ endi
if $data05 != offline then
goto step5
endi
if $data07 != master then
if $data07 != leader then
goto step5
endi
......@@ -251,10 +251,10 @@ endi
if $data06 != 2 then
goto step6
endi
if $data05 != slave then
if $data05 != follower then
goto step6
endi
if $data07 != master then
if $data07 != leader then
goto step6
endi
......@@ -337,7 +337,7 @@ endi
if $data06 != 2 then
goto step7
endi
if $data05 != master then
if $data05 != leader then
goto step7
endi
if $data07 != offline then
......@@ -422,10 +422,10 @@ endi
if $data06 != 2 then
goto step8
endi
if $data05 != master then
if $data05 != leader then
goto step8
endi
if $data07 != slave then
if $data07 != follower then
goto step8
endi
......@@ -521,7 +521,7 @@ endi
if $data05 != offline then
goto step7
endi
if $data07 != master then
if $data07 != leader then
goto step7
endi
......
......@@ -74,13 +74,13 @@ print mnode2Role $mnode2Role
$mnode3Role = $data2_3
print mnode3Role $mnode3Role
if $mnode1Role != master then
if $mnode1Role != leader then
goto step1
endi
if $mnode2Role != slave then
if $mnode2Role != follower then
goto step1
endi
if $mnode3Role != slave then
if $mnode3Role != follower then
goto step1
endi
......
# Test case describe: dnode1 is only mnode, dnode2/dnode3 are only vnode
# step 1: start dnode1
# step 2: start dnode2 and dnode3, and all added into cluster (Suppose dnode2 is master-vnode)
# step 2: start dnode2 and dnode3, and all added into cluster (Suppose dnode2 is leader-vnode)
# step 2: create db, table, insert data, and Falling disc into file (control only one file, e.g. 1841)
# step 3: insert old data(now-20d) and new data(now-40d), control data rows in order to save in cache, not falling disc
# step 4: stop dnode2, so date rows falling disc, generate two new files 1840, 1842 in dnode2
......@@ -145,7 +145,7 @@ if $dnode2Status != ready then
goto wait_dnode3_offline
endi
sleep $sleepTimer # waitting for move master vnode of dnode2 to dnode3
sleep $sleepTimer # waitting for move leader vnode of dnode2 to dnode3
# check using select
sql select count(*) from $stb
print data00 $data00
......
# Test case describe: dnode1 is only mnode, dnode2/dnode3 are only vnode
# step 1: start dnode1
# step 2: start dnode2 and dnode3, and all added into cluster (Suppose dnode2 is master-vnode)
# step 2: start dnode2 and dnode3, and all added into cluster (Suppose dnode2 is leader-vnode)
# step 3: create db, table, insert data, and Falling disc into file (control only one file, e.g. 1841)
# step 4: insert old data(now-20d) and new data(now-40d), control data rows in order to save in cache, not falling disc
# step 5: stop dnode2, so date rows falling disc, generate two new files 1840, 1842 in dnode2
......
......@@ -144,7 +144,7 @@ if $dnode3Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_offline
endi
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_offline
endi
......@@ -209,11 +209,11 @@ $dnode2Vtatus = $data7_2
print dnode2Vtatus: $dnode3Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
......@@ -325,11 +325,11 @@ $dnode2Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode2_vgroup_slave
endi
if $dnode2Vtatus != slave then
if $dnode2Vtatus != follower then
sleep 2000
goto wait_dnode2_vgroup_slave
endi
......
......@@ -146,7 +146,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......@@ -211,11 +211,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != slave then
if $dnode4Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
......@@ -330,11 +330,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_master
endi
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_master
endi
......@@ -393,11 +393,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_master_2
endi
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_master_2
endi
......
......@@ -145,7 +145,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......@@ -218,11 +218,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != slave then
if $dnode4Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
......@@ -292,7 +292,7 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_master
endi
......
......@@ -151,7 +151,7 @@ if $dnode3Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_offline
endi
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_offline
endi
......@@ -237,11 +237,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode2Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
......@@ -320,7 +320,7 @@ if $dnode2Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_master
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_master
endi
......
......@@ -203,7 +203,7 @@ if $dnode2Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_master
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_master
endi
......@@ -328,11 +328,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode2Vtatus = $data7_2
$dnode3Vtatus = $data5_2
if $dnode2Vtatus != slave then
if $dnode2Vtatus != follower then
sleep 2000
goto wait_dnode3_vgroup_master_1
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_master_1
endi
......
......@@ -165,7 +165,7 @@ if $dnode2Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_master
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_master
endi
......@@ -290,11 +290,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode2Vtatus = $data7_2
$dnode3Vtatus = $data5_2
if $dnode2Vtatus != slave then
if $dnode2Vtatus != follower then
sleep 2000
goto wait_dnode3_vgroup_master_1
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_master_1
endi
......
......@@ -148,7 +148,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......@@ -206,11 +206,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != slave then
if $dnode4Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
......@@ -306,11 +306,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
......@@ -422,11 +422,11 @@ $dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode2_vgroup_slave
endi
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode2_vgroup_slave
endi
......
......@@ -151,7 +151,7 @@ if $dnode3Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_offline
endi
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_offline
endi
......@@ -237,11 +237,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode2Vtatus = $data7_2
$dnode3Vtatus = $data5_2
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
if $dnode3Vtatus != slave then
if $dnode3Vtatus != follower then
sleep 2000
goto wait_dnode3_vgroup_slave
endi
......@@ -320,7 +320,7 @@ if $dnode2Vtatus != offline then
sleep 2000
goto wait_dnode3_vgroup_master
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode3_vgroup_master
endi
......
......@@ -268,7 +268,7 @@ if $dnode3Vtatus != offline then
sleep 2000
goto wait_dnode2_vgroup_master
endi
if $dnode2Vtatus != master then
if $dnode2Vtatus != leader then
sleep 2000
goto wait_dnode2_vgroup_master
endi
......
......@@ -104,7 +104,7 @@ $mnode2Status = $data2_2
$mnode3Status = $data2_3
#$mnode4Status = $data2_4
if $mnode1Status != master then
if $mnode1Status != leader then
return -1
endi
......
# Test case describe: dnode1 is only mnode, dnode2/dnode3 are only vnode
# step 1: start dnode1
# step 2: start dnode2 and dnode3, and all added into cluster (Suppose dnode2 is master-vnode)
# step 2: start dnode2 and dnode3, and all added into cluster (Suppose dnode2 is leader-vnode)
# step 3: create db, table, insert data, and Falling disc into file (control only one file, e.g. 1841)
# step 4: insert old data(now-15d) and new data(now+15d), control data rows in order to save in cache, not falling disc
# step 5: stop dnode2, so date rows falling disc, generate two new files 1840, 1842 in dnode2
......@@ -157,7 +157,7 @@ if $dnode3Status != ready then
goto wait_dnode2_offline
endi
sleep $sleepTimer # waitting for move master vnode of dnode2 to dnode3
sleep $sleepTimer # waitting for move leader vnode of dnode2 to dnode3
# check using select
sql select count(*) from $stb
print data00 $data00
......
......@@ -146,7 +146,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -151,7 +151,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -229,7 +229,7 @@ if $data2_1 != offline then
sleep 2000
goto wait_dnode2_master
endi
if $data2_2 != master then
if $data2_2 != leader then
sleep 2000
goto wait_dnode2_master
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -148,7 +148,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -146,7 +146,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......@@ -210,7 +210,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != slave then
if $dnode4Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
......@@ -243,7 +243,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_master
endi
......@@ -317,7 +317,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != slave then
if $dnode4Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_slave_2
endi
......@@ -350,7 +350,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_master_2
endi
......@@ -440,7 +440,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != slave then
if $dnode4Vtatus != follower then
sleep 2000
goto wait_dnode4_vgroup_slave_3
endi
......@@ -473,7 +473,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != master then
if $dnode4Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_master_3
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -150,7 +150,7 @@ if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus != leader then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
......
......@@ -201,10 +201,10 @@ print dnode1 ==> $dnode1Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
return -1
endi
......@@ -245,7 +245,7 @@ print dnode1 ==> $dnode1Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
......@@ -283,11 +283,11 @@ $dnode4Role = $data2_4
print dnode1 ==> $dnode1Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode4Role != slave then
if $dnode4Role != follower then
return -1
endi
......
......@@ -91,13 +91,13 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto step1
endi
if $data2_3 != slave then
if $data2_3 != follower then
goto step1
endi
......@@ -235,17 +235,17 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != null then
return -1
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
return -1
endi
if $dnode4Role != slave then
if $dnode4Role != follower then
return -1
endi
......@@ -288,7 +288,7 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != null then
......@@ -298,7 +298,7 @@ if $dnode3Role != null then
return -1
endi
if $dnode4Role != slave then
if $dnode4Role != follower then
return -1
endi
......
......@@ -76,13 +76,13 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto step1
endi
if $data2_3 != slave then
if $data2_3 != follower then
goto step1
endi
......@@ -248,7 +248,7 @@ print dnode3 ==> $data2_3
print dnode4 ==> $data2_4
print dnode5 ==> $data2_5
if $data2_4 != slave then
if $data2_4 != follower then
goto show4
endi
......@@ -298,7 +298,7 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
if $data2_5 != slave then
if $data2_5 != follower then
goto show5
endi
......@@ -389,7 +389,7 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
if $data2_6 != slave then
if $data2_6 != follower then
goto show7
endi
......@@ -459,10 +459,10 @@ print dnode7 ==> $data2_7
if $data2_1 != offline then
goto show9
endi
if $data2_5 != master then
if $data2_5 != leader then
goto show9
endi
if $data2_6 != slave then
if $data2_6 != follower then
goto show9
endi
......@@ -488,13 +488,13 @@ print dnode7 ==> $data2_7
if $data2_1 != null then
goto show10
endi
if $data2_5 != master then
if $data2_5 != leader then
goto show10
endi
if $data2_6 != slave then
if $data2_6 != follower then
goto show10
endi
if $data2_7 != slave then
if $data2_7 != follower then
goto show10
endi
......
......@@ -57,9 +57,9 @@ endi
#sql create table sys.st as select avg(taosd), avg(system) from sys.cpu interval(30s)
sql show log.vgroups
if $data05 != master then
if $data05 != leader then
return -1
endi
if $data15 != master then
if $data15 != leader then
return -1
endi
......@@ -55,13 +55,13 @@ print mnode2Role $mnode2Role
$mnode3Role = $data2_3
print mnode3Role $mnode3Role
if $mnode1Role != master then
if $mnode1Role != leader then
goto show1
endi
if $mnode2Role != slave then
if $mnode2Role != follower then
goto show1
endi
if $mnode3Role != slave then
if $mnode3Role != follower then
goto show1
endi
......
......@@ -46,13 +46,13 @@ print $dnode1Role
print $dnode2Role
print $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto show2
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto show2
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto show2
endi
......@@ -109,13 +109,13 @@ sql show mnodes -x show7
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode3Role = $data2_3
if $dnode1Role != master then
if $dnode1Role != leader then
goto show7
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto show7
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto show7
endi
......
......@@ -10,17 +10,17 @@
#taos> show vgroups;
# vgId | tables | status | onlineVnodes | dnode | vstatus | dnode | vstatus |
#======================================================================================================
# 2 | 1024 | ready | 2 | 3 | master | 2 | slave |
# 3 | 1024 | ready | 2 | 3 | master | 2 | slave |
# 4 | 1024 | ready | 2 | 3 | master | 2 | slave |
# 5 | 718 | ready | 2 | 3 | master | 2 | slave |
# 2 | 1024 | ready | 2 | 3 | leader | 2 | follower |
# 3 | 1024 | ready | 2 | 3 | leader | 2 | follower |
# 4 | 1024 | ready | 2 | 3 | leader | 2 | follower |
# 5 | 718 | ready | 2 | 3 | leader | 2 | follower |
#Query OK, 4 row(s) in set (0.002749s)
#
#taos> show mnodes
# -> ;
# id | end_point | role | create_time |
#=====================================================================================
# 1 | ubuntu-OptiPlex-7060:7100 | master | 2020-07-22 06:25:31.677 |
# 1 | ubuntu-OptiPlex-7060:7100 | leader | 2020-07-22 06:25:31.677 |
#Query OK, 1 row(s) in set (0.002126s)
......@@ -136,7 +136,7 @@ if $vg2Dnode3Status != offline then
sleep 2000
goto wait_vgroup_chang_0
endi
if $vg2Dnode2Status != master then
if $vg2Dnode2Status != leader then
sleep 2000
goto wait_vgroup_chang_0
endi
......@@ -165,11 +165,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode3Status != slave then
if $vg2Dnode3Status != follower then
sleep 2000
goto wait_vgroup_chang_1
endi
if $vg2Dnode2Status != master then
if $vg2Dnode2Status != leader then
sleep 2000
goto wait_vgroup_chang_1
endi
......@@ -197,7 +197,7 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode3Status != master then
if $vg2Dnode3Status != leader then
sleep 2000
goto wait_vgroup_chang_2
endi
......@@ -230,11 +230,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode2Status != slave then
if $vg2Dnode2Status != follower then
sleep 2000
goto wait_vgroup_chang_3
endi
if $vg2Dnode3Status != master then
if $vg2Dnode3Status != leader then
sleep 2000
goto wait_vgroup_chang_3
endi
......
......@@ -13,7 +13,7 @@ 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
print ========= start dnode1 as master
print ========= start dnode1 as leader
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 2000
......
......@@ -84,7 +84,7 @@ step3:
sql show mnodes
print dnode1 role $data2_1
if $data2_1 != master then
if $data2_1 != leader then
goto step3
endi
......
......@@ -60,7 +60,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
if $data2_2 != null then
......
......@@ -66,7 +66,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -67,7 +67,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -54,7 +54,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -47,7 +47,7 @@ endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -60,7 +60,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -54,7 +54,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
if $data2_2 != null then
......
......@@ -66,13 +66,13 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != null then
goto show2
endi
if $data2_3 != slave then
if $data2_3 != follower then
goto show2
endi
......
......@@ -59,7 +59,7 @@ endi
sql show mnodes
print mnode1 $data2_1
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -178,7 +178,7 @@ endi
print =============== step8 - monitor dbs
#system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show dnodes;show mnodes;' 127.0.0.1:7111/admin/sqls
#print 24-> $system_content
#if $system_content != @[{"status":"succ","head":["IP","created time","open vnodes","free vnodes","status","balance state"],"data":[["127.0.0.1","2018-09-04 #11:16:13.985",1,3,"ready","balanced"]],"rows":1},{"status":"succ","head":["IP","created time","status","role"],"data":[["127.0.0.1","2018-09-04 11:16:13.371","serving","master"]],"rows":1}]@ then
#if $system_content != @[{"status":"succ","head":["IP","created time","open vnodes","free vnodes","status","balance state"],"data":[["127.0.0.1","2018-09-04 #11:16:13.985",1,3,"ready","balanced"]],"rows":1},{"status":"succ","head":["IP","created time","status","role"],"data":[["127.0.0.1","2018-09-04 11:16:13.371","serving","leader"]],"rows":1}]@ then
# return -1
# endi
......
......@@ -195,33 +195,33 @@ print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $dat
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
if $data5_4 != master then
if $data5_4 != leader then
print $data5_4
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data5_3 != slave then
if $data5_3 != follower then
print $data5_2
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data5_2 != master then
if $data5_2 != leader then
print $data5_3
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_4 != slave then
if $data7_4 != follower then
print $data7_4
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_3 != master then
if $data7_3 != leader then
print $data7_3
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_2 != slave then
if $data7_2 != follower then
print $data7_2
sleep 2000
goto wait_dnode1_vgroup_slave
......
......@@ -197,28 +197,28 @@ print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $dat
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
if $data5_4 != master then
if $data5_4 != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data5_3 != slave then
if $data5_3 != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data5_2 != master then
if $data5_2 != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_4 != slave then
if $data7_4 != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_3 != master then
if $data7_3 != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_2 != slave then
if $data7_2 != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
......
......@@ -169,28 +169,28 @@ $d1v2status = $data7_4
$d1v3status = $data7_2
$d1v4status = $data7_3
if $d2v2status != master then
if $d2v2status != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $d2v3status != master then
if $d2v3status != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $d2v4status != master then
if $d2v4status != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $d1v2status != slave then
if $d1v2status != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $d1v3status != slave then
if $d1v3status != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $d1v4status != slave then
if $d1v4status != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
......
......@@ -195,28 +195,28 @@ print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $dat
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4 $data5_4 $data6_4 $data7_4 $data8_4 $data9_4
if $data5_4 != master then
if $data5_4 != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data5_3 != slave then
if $data5_3 != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data5_2 != master then
if $data5_2 != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_4 != slave then
if $data7_4 != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_3 != master then
if $data7_3 != leader then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
if $data7_2 != slave then
if $data7_2 != follower then
sleep 2000
goto wait_dnode1_vgroup_slave
endi
......
......@@ -27,10 +27,10 @@ show2:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
......@@ -61,10 +61,10 @@ show4:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show4
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show4
endi
......
......@@ -15,7 +15,7 @@ sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
......@@ -33,10 +33,10 @@ show2:
sql show mnodes -x show2
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
......
......@@ -14,7 +14,7 @@ sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
......@@ -33,26 +33,26 @@ show2:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
print ============== step3
sql_error drop dnode $hostname1 -x error1
print should not drop master
print should not drop leader
print ============== step4
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
sql_error show mnodes
print error of no master
print error of no leader
print ============== step5
sql_error drop dnode $hostname1
print error of no master
print error of no leader
print ============== step6
system sh/exec.sh -n dnode1 -s start
......@@ -71,10 +71,10 @@ show6:
sql show mnodes -x show6
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show6
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show6
endi
......@@ -94,10 +94,10 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto show7
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show7
endi
if $data3_3 != null then
......
......@@ -14,7 +14,7 @@ sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
......@@ -33,10 +33,10 @@ show2:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
......@@ -53,10 +53,10 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
return -1
endi
if $dnode3Role != null then
......@@ -82,13 +82,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step4
endi
if $dnode2Role != null then
goto step4
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step4
endi
......@@ -117,13 +117,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step5
endi
if $dnode2Role != null then
goto step5
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step5
endi
......
......@@ -14,7 +14,7 @@ sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
......@@ -33,10 +33,10 @@ show2:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
......@@ -67,10 +67,10 @@ sql show mnodes -x step5
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto step5
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto step5
endi
......
......@@ -14,7 +14,7 @@ sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
......@@ -33,10 +33,10 @@ show2:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
......@@ -53,10 +53,10 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
return -1
endi
if $dnode3Role != null then
......@@ -75,13 +75,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != null then
return -1
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
return -1
endi
......
......@@ -14,7 +14,7 @@ sql connect
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
......@@ -33,10 +33,10 @@ show2:
sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
if $data2_1 != master then
if $data2_1 != leader then
goto show2
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto show2
endi
......@@ -53,10 +53,10 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
return -1
endi
if $dnode3Role != null then
......@@ -76,13 +76,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != null then
return -1
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
return -1
endi
......@@ -103,13 +103,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != null then
return -1
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
return -1
endi
......
......@@ -19,7 +19,7 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode3 ==> $data3_3
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
if $data3_2 != null then
......@@ -53,13 +53,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step2
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step2
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step2
endi
......
......@@ -15,7 +15,7 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode3 ==> $data3_3
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
if $data3_2 != null then
......@@ -45,10 +45,10 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step2
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step2
endi
if $dnode3Role != null then
......@@ -75,13 +75,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step3
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step3
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step3
endi
......@@ -104,13 +104,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step4
endi
if $dnode2Role != null then
goto step4
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step4
endi
......@@ -138,13 +138,13 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step5
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step5
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step5
endi
......@@ -169,10 +169,10 @@ print dnode3 ==> $dnode3Role
if $dnode1Role != offline then
goto step6
endi
#if $dnode2Role != master then
#if $dnode2Role != leader then
# return -1
#endi
#if $dnode3Role != slave then
#if $dnode3Role != follower then
# return -1
#endi
......@@ -197,10 +197,10 @@ print dnode3 ==> $dnode3Role
if $dnode1Role != null then
goto step7
endi
#if $dnode2Role != master then
#if $dnode2Role != leader then
# return -1
#endi
#if $dnode3Role != slave then
#if $dnode3Role != follower then
# return -1
#endi
......
......@@ -18,7 +18,7 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode3 ==> $data3_3
if $data2_1 != master then
if $data2_1 != leader then
return -1
endi
if $data3_2 != null then
......@@ -49,10 +49,10 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step2
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step2
endi
if $dnode3Role != null then
......@@ -84,13 +84,13 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step3
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step3
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step3
endi
if $dnode4Role != null then
......@@ -119,13 +119,13 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step4
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step4
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step4
endi
if $dnode4Role != null then
......@@ -152,16 +152,16 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step5
endi
if $dnode2Role != null then
goto step5
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step5
endi
if $dnode4Role != slave then
if $dnode4Role != follower then
goto step5
endi
......@@ -190,16 +190,16 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step6
endi
if $dnode2Role != null then
goto step6
endi
if $dnode3Role != slave then
if $dnode3Role != follower then
goto step6
endi
if $dnode4Role != slave then
if $dnode4Role != follower then
goto step6
endi
......@@ -249,13 +249,13 @@ print dnode4 ==> $dnode4Role
if $dnode1Role != null then
goto step8
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step8
endi
#if $dnode3Role != master then
#if $dnode3Role != leader then
# return -1
#endi
#if $dnode4Role != slave then
#if $dnode4Role != follower then
# return -1
#endi
......
......@@ -20,7 +20,7 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
return -1
endi
if $dnode2Role != null then
......@@ -72,10 +72,10 @@ print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != leader then
goto step4
endi
if $dnode2Role != slave then
if $dnode2Role != follower then
goto step4
endi
if $dnode3Role != null then
......
......@@ -51,7 +51,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -52,7 +52,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
......@@ -44,13 +44,13 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
if $data2_2 != slave then
if $data2_2 != follower then
goto step1
endi
if $data2_3 != slave then
if $data2_3 != follower then
goto step1
endi
......
......@@ -59,7 +59,7 @@ sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
if $data2_1 != leader then
goto step1
endi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册