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