From 7e22a3093f0b0391e604cddf75ab820f8a9cc38a Mon Sep 17 00:00:00 2001 From: Bo Ding Date: Fri, 24 Jun 2022 10:23:21 +0800 Subject: [PATCH] enh: change master/slave to leader/follower --- src/plugins/monitor/src/monMain.c | 8 ++--- src/sync/src/syncMain.c | 4 +-- tests/pytest/client/client.py | 4 +-- tests/pytest/cluster/changeReplicaTest.py | 12 +++---- .../manualTest/TD-5114/checkClusterStatus.py | 2 +- tests/script/general/db/alter_tables_d2.sim | 10 +++--- tests/script/general/db/alter_tables_v1.sim | 12 +++---- tests/script/general/db/alter_tables_v4.sim | 10 +++--- tests/script/general/db/delete.sim | 2 +- tests/script/general/wal/sync.sim | 6 ++-- tests/script/issue/TD-2677.sim | 6 ++-- tests/script/issue/TD-2680.sim | 2 +- tests/script/issue/TD-2713.sim | 6 ++-- tests/script/issue/TD-3300.sim | 22 ++++++------ tests/script/tmp/mnodes.sim | 6 ++-- .../arbitrator/dn2_mn1_cache_file_sync.sim | 4 +-- .../dn2_mn1_cache_file_sync_second.sim | 2 +- .../arbitrator/dn3_mn1_r2_vnode_delDir.sim | 10 +++--- .../arbitrator/dn3_mn1_r3_vnode_delDir.sim | 14 ++++---- .../arbitrator/dn3_mn1_vnode_change.sim | 8 ++--- .../dn3_mn1_vnode_corruptFile_offline.sim | 8 ++--- .../dn3_mn1_vnode_corruptFile_online.sim | 6 ++-- .../dn3_mn1_vnode_createErrData_online.sim | 6 ++-- .../arbitrator/dn3_mn1_vnode_delDir.sim | 14 ++++---- .../dn3_mn1_vnode_noCorruptFile_offline.sim | 8 ++--- .../arbitrator/dn3_mn1_vnode_nomaster.sim | 2 +- .../unique/arbitrator/dn3_mn2_killDnode.sim | 2 +- .../arbitrator/insert_duplicationTs.sim | 4 +-- .../offline_replica2_alterTable_online.sim | 2 +- .../offline_replica2_alterTag_online.sim | 2 +- .../offline_replica2_createTable_online.sim | 2 +- .../offline_replica2_dropDb_online.sim | 2 +- .../offline_replica2_dropTable_online.sim | 2 +- .../offline_replica3_alterTable_online.sim | 2 +- .../offline_replica3_alterTag_online.sim | 2 +- .../offline_replica3_createTable_online.sim | 2 +- .../offline_replica3_dropDb_online.sim | 2 +- .../offline_replica3_dropTable_online.sim | 2 +- .../replica_changeWithArbitrator.sim | 2 +- .../sync_replica2_alterTable_add.sim | 2 +- .../sync_replica2_alterTable_drop.sim | 2 +- .../arbitrator/sync_replica2_dropDb.sim | 2 +- .../arbitrator/sync_replica2_dropTable.sim | 2 +- .../sync_replica3_alterTable_add.sim | 2 +- .../sync_replica3_alterTable_drop.sim | 2 +- .../arbitrator/sync_replica3_createTable.sim | 2 +- ...ca3_dnodeChang_DropAddAlterTableDropDb.sim | 14 ++++---- .../arbitrator/sync_replica3_dropDb.sim | 2 +- .../arbitrator/sync_replica3_dropTable.sim | 2 +- tests/script/unique/cluster/balance1.sim | 10 +++--- tests/script/unique/cluster/balance2.sim | 16 ++++----- tests/script/unique/cluster/balance3.sim | 22 ++++++------ tests/script/unique/cluster/cache.sim | 4 +-- tests/script/unique/cluster/flowctrl.sim | 6 ++-- tests/script/unique/cluster/vgroup100.sim | 12 +++---- .../unique/clusterSimCase/cluster_main.sim | 22 ++++++------ tests/script/unique/db/commit.sim | 2 +- tests/script/unique/db/delete.sim | 2 +- tests/script/unique/db/replica_add12.sim | 2 +- tests/script/unique/db/replica_add13.sim | 2 +- tests/script/unique/db/replica_add23.sim | 2 +- tests/script/unique/db/replica_part.sim | 2 +- tests/script/unique/db/replica_reduce21.sim | 2 +- tests/script/unique/db/replica_reduce31.sim | 2 +- tests/script/unique/db/replica_reduce32.sim | 2 +- tests/script/unique/dnode/alternativeRole.sim | 4 +-- tests/script/unique/dnode/offline3.sim | 2 +- tests/script/unique/http/admin.sim | 2 +- .../migrate/mn2_vn2_repl2_rmMnodeDir.sim | 12 +++---- .../migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim | 12 +++---- ..._repl2_rmMnodeVnodeDir_stopAll_starAll.sim | 12 +++---- .../migrate/mn2_vn2_repl2_rmVnodeDir.sim | 12 +++---- tests/script/unique/mnode/mgmt20.sim | 8 ++--- tests/script/unique/mnode/mgmt21.sim | 6 ++-- tests/script/unique/mnode/mgmt22.sim | 20 +++++------ tests/script/unique/mnode/mgmt23.sim | 18 +++++----- tests/script/unique/mnode/mgmt24.sim | 10 +++--- tests/script/unique/mnode/mgmt25.sim | 14 ++++---- tests/script/unique/mnode/mgmt26.sim | 18 +++++----- tests/script/unique/mnode/mgmt30.sim | 8 ++--- tests/script/unique/mnode/mgmt33.sim | 30 ++++++++-------- tests/script/unique/mnode/mgmt34.sim | 36 +++++++++---------- tests/script/unique/mnode/mgmtr2.sim | 6 ++-- tests/script/unique/vnode/many.sim | 2 +- tests/script/unique/vnode/replica2_repeat.sim | 2 +- tests/script/unique/vnode/replica3_basic.sim | 6 ++-- tests/script/unique/vnode/replica3_repeat.sim | 2 +- 87 files changed, 303 insertions(+), 303 deletions(-) diff --git a/src/plugins/monitor/src/monMain.c b/src/plugins/monitor/src/monMain.c index 1ff2f0ef8d..bd0e015205 100644 --- a/src/plugins/monitor/src/monMain.c +++ b/src/plugins/monitor/src/monMain.c @@ -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; } } diff --git a/src/sync/src/syncMain.c b/src/sync/src/syncMain.c index be35f3aaf9..3f5b2e12e2 100644 --- a/src/sync/src/syncMain.c +++ b/src/sync/src/syncMain.c @@ -68,8 +68,8 @@ char* syncRole[] = { "offline", "unsynced", "syncing", - "slave", - "master" + "follower", + "leader" }; char *syncStatus[] = { diff --git a/tests/pytest/client/client.py b/tests/pytest/client/client.py index 9192f7e6d3..308ffab848 100644 --- a/tests/pytest/client/client.py +++ b/tests/pytest/client/client.py @@ -50,7 +50,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) @@ -73,7 +73,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") cmd = "taos -h 127.0.0.1 -s 'show databases'" r = os.popen(cmd) diff --git a/tests/pytest/cluster/changeReplicaTest.py b/tests/pytest/cluster/changeReplicaTest.py index 7fa68edbfe..a7b357cc57 100644 --- a/tests/pytest/cluster/changeReplicaTest.py +++ b/tests/pytest/cluster/changeReplicaTest.py @@ -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 diff --git a/tests/pytest/manualTest/TD-5114/checkClusterStatus.py b/tests/pytest/manualTest/TD-5114/checkClusterStatus.py index c6bff305a5..213d6b87ab 100644 --- a/tests/pytest/manualTest/TD-5114/checkClusterStatus.py +++ b/tests/pytest/manualTest/TD-5114/checkClusterStatus.py @@ -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] diff --git a/tests/script/general/db/alter_tables_d2.sim b/tests/script/general/db/alter_tables_d2.sim index f74f98d571..41d72e35d3 100644 --- a/tests/script/general/db/alter_tables_d2.sim +++ b/tests/script/general/db/alter_tables_d2.sim @@ -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 diff --git a/tests/script/general/db/alter_tables_v1.sim b/tests/script/general/db/alter_tables_v1.sim index 20c4c73363..8708d764e4 100644 --- a/tests/script/general/db/alter_tables_v1.sim +++ b/tests/script/general/db/alter_tables_v1.sim @@ -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 diff --git a/tests/script/general/db/alter_tables_v4.sim b/tests/script/general/db/alter_tables_v4.sim index 10bb4e108b..02816097ed 100644 --- a/tests/script/general/db/alter_tables_v4.sim +++ b/tests/script/general/db/alter_tables_v4.sim @@ -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 diff --git a/tests/script/general/db/delete.sim b/tests/script/general/db/delete.sim index 4384044885..80ec812c74 100644 --- a/tests/script/general/db/delete.sim +++ b/tests/script/general/db/delete.sim @@ -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 diff --git a/tests/script/general/wal/sync.sim b/tests/script/general/wal/sync.sim index 3a89523918..bd9ed574a9 100644 --- a/tests/script/general/wal/sync.sim +++ b/tests/script/general/wal/sync.sim @@ -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 diff --git a/tests/script/issue/TD-2677.sim b/tests/script/issue/TD-2677.sim index 8d2058a385..db61aca811 100644 --- a/tests/script/issue/TD-2677.sim +++ b/tests/script/issue/TD-2677.sim @@ -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 diff --git a/tests/script/issue/TD-2680.sim b/tests/script/issue/TD-2680.sim index 631332160f..4f1bd63dd8 100644 --- a/tests/script/issue/TD-2680.sim +++ b/tests/script/issue/TD-2680.sim @@ -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 diff --git a/tests/script/issue/TD-2713.sim b/tests/script/issue/TD-2713.sim index b66c55b9b9..f2c0bc9eb5 100644 --- a/tests/script/issue/TD-2713.sim +++ b/tests/script/issue/TD-2713.sim @@ -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 diff --git a/tests/script/issue/TD-3300.sim b/tests/script/issue/TD-3300.sim index 0745ceb849..8ff3af5895 100644 --- a/tests/script/issue/TD-3300.sim +++ b/tests/script/issue/TD-3300.sim @@ -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 diff --git a/tests/script/tmp/mnodes.sim b/tests/script/tmp/mnodes.sim index 8bca76c38b..e9b03c8447 100644 --- a/tests/script/tmp/mnodes.sim +++ b/tests/script/tmp/mnodes.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim b/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim index dbd0e2bd87..f20c92b982 100644 --- a/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim +++ b/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim @@ -1,6 +1,6 @@ # 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 diff --git a/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync_second.sim b/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync_second.sim index e15edb3f3d..a7380a8de9 100644 --- a/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync_second.sim +++ b/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync_second.sim @@ -1,6 +1,6 @@ # 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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim b/tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim index 96fde9061a..3f5bcc5da9 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim b/tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim index da76cc467b..f0d2b41ce8 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim index 6d81effab6..53a1ce04fa 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim index d22aca07cb..ba15bb42d5 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim index 884a43bce1..119cb418db 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim index 3c74de4916..f393e4afba 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim index d0399222f1..00ab574e07 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_delDir.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim index 01534f9476..370b19990b 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim index b9ee508f78..35a7bf8966 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn2_killDnode.sim b/tests/script/unique/arbitrator/dn3_mn2_killDnode.sim index d90853d2e4..d12b5ff3ad 100644 --- a/tests/script/unique/arbitrator/dn3_mn2_killDnode.sim +++ b/tests/script/unique/arbitrator/dn3_mn2_killDnode.sim @@ -104,7 +104,7 @@ $mnode2Status = $data2_2 $mnode3Status = $data2_3 #$mnode4Status = $data2_4 -if $mnode1Status != master then +if $mnode1Status != leader then return -1 endi diff --git a/tests/script/unique/arbitrator/insert_duplicationTs.sim b/tests/script/unique/arbitrator/insert_duplicationTs.sim index 4af47ca336..f10405eaa9 100644 --- a/tests/script/unique/arbitrator/insert_duplicationTs.sim +++ b/tests/script/unique/arbitrator/insert_duplicationTs.sim @@ -1,6 +1,6 @@ # 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 diff --git a/tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim b/tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim index 0adb6b4759..f3da076fde 100644 --- a/tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim +++ b/tests/script/unique/arbitrator/offline_replica2_alterTable_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim b/tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim index a0877ad89c..6a4c92959c 100644 --- a/tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim +++ b/tests/script/unique/arbitrator/offline_replica2_alterTag_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica2_createTable_online.sim b/tests/script/unique/arbitrator/offline_replica2_createTable_online.sim index 376484a066..d97638b6fc 100644 --- a/tests/script/unique/arbitrator/offline_replica2_createTable_online.sim +++ b/tests/script/unique/arbitrator/offline_replica2_createTable_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim b/tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim index 9f21193400..bb51700196 100644 --- a/tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim +++ b/tests/script/unique/arbitrator/offline_replica2_dropDb_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim b/tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim index cb3bbb3a73..592ad1b136 100644 --- a/tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim +++ b/tests/script/unique/arbitrator/offline_replica2_dropTable_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim b/tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim index 8a9995f891..b75a06874e 100644 --- a/tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim +++ b/tests/script/unique/arbitrator/offline_replica3_alterTable_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim b/tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim index 6eed563bbc..5a06ab4405 100644 --- a/tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim +++ b/tests/script/unique/arbitrator/offline_replica3_alterTag_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica3_createTable_online.sim b/tests/script/unique/arbitrator/offline_replica3_createTable_online.sim index 2633d822c9..31fe60aaac 100644 --- a/tests/script/unique/arbitrator/offline_replica3_createTable_online.sim +++ b/tests/script/unique/arbitrator/offline_replica3_createTable_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim b/tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim index 3abfc40161..725ca1b620 100644 --- a/tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim +++ b/tests/script/unique/arbitrator/offline_replica3_dropDb_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim b/tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim index f2acb8b90a..7dea6b24a9 100644 --- a/tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim +++ b/tests/script/unique/arbitrator/offline_replica3_dropTable_online.sim @@ -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 diff --git a/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim b/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim index 9d0e967f4e..5c8e06fadd 100644 --- a/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim +++ b/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim @@ -224,7 +224,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 diff --git a/tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim b/tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim index a8c0e83cc1..7ce878c63a 100644 --- a/tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim +++ b/tests/script/unique/arbitrator/sync_replica2_alterTable_add.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim b/tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim index 951d26635b..83e31ff9ae 100644 --- a/tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim +++ b/tests/script/unique/arbitrator/sync_replica2_alterTable_drop.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica2_dropDb.sim b/tests/script/unique/arbitrator/sync_replica2_dropDb.sim index e4e7f95188..2272e63f04 100644 --- a/tests/script/unique/arbitrator/sync_replica2_dropDb.sim +++ b/tests/script/unique/arbitrator/sync_replica2_dropDb.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica2_dropTable.sim b/tests/script/unique/arbitrator/sync_replica2_dropTable.sim index 0049dc6fba..4f7588a43b 100644 --- a/tests/script/unique/arbitrator/sync_replica2_dropTable.sim +++ b/tests/script/unique/arbitrator/sync_replica2_dropTable.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim b/tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim index 4990899601..fa34a67b93 100644 --- a/tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim +++ b/tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim b/tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim index 10bd4fc8bd..aefb849527 100644 --- a/tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim +++ b/tests/script/unique/arbitrator/sync_replica3_alterTable_drop.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica3_createTable.sim b/tests/script/unique/arbitrator/sync_replica3_createTable.sim index a0b391dd76..0cea59f799 100644 --- a/tests/script/unique/arbitrator/sync_replica3_createTable.sim +++ b/tests/script/unique/arbitrator/sync_replica3_createTable.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim b/tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim index 68c6ecbd6e..2f29dfb472 100644 --- a/tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim +++ b/tests/script/unique/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica3_dropDb.sim b/tests/script/unique/arbitrator/sync_replica3_dropDb.sim index 83e53eaeeb..4f61da9d9d 100644 --- a/tests/script/unique/arbitrator/sync_replica3_dropDb.sim +++ b/tests/script/unique/arbitrator/sync_replica3_dropDb.sim @@ -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 diff --git a/tests/script/unique/arbitrator/sync_replica3_dropTable.sim b/tests/script/unique/arbitrator/sync_replica3_dropTable.sim index 7496541b76..a74364a158 100644 --- a/tests/script/unique/arbitrator/sync_replica3_dropTable.sim +++ b/tests/script/unique/arbitrator/sync_replica3_dropTable.sim @@ -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 diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index c98687a81c..b686fb8665 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -192,10 +192,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 @@ -236,7 +236,7 @@ print dnode1 ==> $dnode1Role print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role -if $dnode1Role != master then +if $dnode1Role != leader then return -1 endi @@ -274,11 +274,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 diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index 0b80acbe6c..789d3787b5 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -82,13 +82,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 @@ -226,17 +226,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 @@ -279,7 +279,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 @@ -289,7 +289,7 @@ if $dnode3Role != null then return -1 endi -if $dnode4Role != slave then +if $dnode4Role != follower then return -1 endi diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index c2e9a84514..0f583ed600 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -68,13 +68,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 @@ -240,7 +240,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 @@ -290,7 +290,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 @@ -381,7 +381,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 @@ -451,10 +451,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 @@ -480,13 +480,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 diff --git a/tests/script/unique/cluster/cache.sim b/tests/script/unique/cluster/cache.sim index 1b3771353f..f4da8380eb 100644 --- a/tests/script/unique/cluster/cache.sim +++ b/tests/script/unique/cluster/cache.sim @@ -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 diff --git a/tests/script/unique/cluster/flowctrl.sim b/tests/script/unique/cluster/flowctrl.sim index 700fa0a3f1..8e04767ffd 100644 --- a/tests/script/unique/cluster/flowctrl.sim +++ b/tests/script/unique/cluster/flowctrl.sim @@ -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 diff --git a/tests/script/unique/cluster/vgroup100.sim b/tests/script/unique/cluster/vgroup100.sim index 656ed2ec44..cfe2765798 100644 --- a/tests/script/unique/cluster/vgroup100.sim +++ b/tests/script/unique/cluster/vgroup100.sim @@ -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 diff --git a/tests/script/unique/clusterSimCase/cluster_main.sim b/tests/script/unique/clusterSimCase/cluster_main.sim index 274ce85974..2ec6ce9b55 100644 --- a/tests/script/unique/clusterSimCase/cluster_main.sim +++ b/tests/script/unique/clusterSimCase/cluster_main.sim @@ -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 diff --git a/tests/script/unique/db/commit.sim b/tests/script/unique/db/commit.sim index 661dd4505f..dec78c8e43 100644 --- a/tests/script/unique/db/commit.sim +++ b/tests/script/unique/db/commit.sim @@ -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 diff --git a/tests/script/unique/db/delete.sim b/tests/script/unique/db/delete.sim index c876f23de3..b0ad52e494 100644 --- a/tests/script/unique/db/delete.sim +++ b/tests/script/unique/db/delete.sim @@ -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 diff --git a/tests/script/unique/db/replica_add12.sim b/tests/script/unique/db/replica_add12.sim index d46187e445..6cca6ce4cd 100644 --- a/tests/script/unique/db/replica_add12.sim +++ b/tests/script/unique/db/replica_add12.sim @@ -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 diff --git a/tests/script/unique/db/replica_add13.sim b/tests/script/unique/db/replica_add13.sim index 13a5c97832..6bc76615da 100644 --- a/tests/script/unique/db/replica_add13.sim +++ b/tests/script/unique/db/replica_add13.sim @@ -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 diff --git a/tests/script/unique/db/replica_add23.sim b/tests/script/unique/db/replica_add23.sim index ac0bd6d9d7..ffc62abb8e 100644 --- a/tests/script/unique/db/replica_add23.sim +++ b/tests/script/unique/db/replica_add23.sim @@ -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 diff --git a/tests/script/unique/db/replica_part.sim b/tests/script/unique/db/replica_part.sim index 9880ec666c..924d544c42 100644 --- a/tests/script/unique/db/replica_part.sim +++ b/tests/script/unique/db/replica_part.sim @@ -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 diff --git a/tests/script/unique/db/replica_reduce21.sim b/tests/script/unique/db/replica_reduce21.sim index d3a76485f8..0305f3ad09 100644 --- a/tests/script/unique/db/replica_reduce21.sim +++ b/tests/script/unique/db/replica_reduce21.sim @@ -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 diff --git a/tests/script/unique/db/replica_reduce31.sim b/tests/script/unique/db/replica_reduce31.sim index 5350bcc78c..4286ad94ad 100644 --- a/tests/script/unique/db/replica_reduce31.sim +++ b/tests/script/unique/db/replica_reduce31.sim @@ -55,7 +55,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 diff --git a/tests/script/unique/db/replica_reduce32.sim b/tests/script/unique/db/replica_reduce32.sim index ead265d5d5..730661ec02 100644 --- a/tests/script/unique/db/replica_reduce32.sim +++ b/tests/script/unique/db/replica_reduce32.sim @@ -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 diff --git a/tests/script/unique/dnode/alternativeRole.sim b/tests/script/unique/dnode/alternativeRole.sim index 7e647925d1..ce13a4a847 100644 --- a/tests/script/unique/dnode/alternativeRole.sim +++ b/tests/script/unique/dnode/alternativeRole.sim @@ -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 diff --git a/tests/script/unique/dnode/offline3.sim b/tests/script/unique/dnode/offline3.sim index 93c75e3b13..de5cc94645 100644 --- a/tests/script/unique/dnode/offline3.sim +++ b/tests/script/unique/dnode/offline3.sim @@ -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 diff --git a/tests/script/unique/http/admin.sim b/tests/script/unique/http/admin.sim index ae206744c4..39138d6db7 100644 --- a/tests/script/unique/http/admin.sim +++ b/tests/script/unique/http/admin.sim @@ -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 diff --git a/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim b/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim index e3623c7c62..fbffc0a69b 100644 --- a/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim +++ b/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim @@ -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 diff --git a/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim b/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim index c88e26d7eb..b076c4c501 100644 --- a/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim +++ b/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim @@ -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 diff --git a/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim b/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim index 69e83a2c00..9fe8e31db9 100644 --- a/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim +++ b/tests/script/unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim @@ -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 diff --git a/tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim b/tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim index ed3f9b8274..f665f551f7 100644 --- a/tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim +++ b/tests/script/unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt20.sim b/tests/script/unique/mnode/mgmt20.sim index 8945cffab2..710b3aa169 100644 --- a/tests/script/unique/mnode/mgmt20.sim +++ b/tests/script/unique/mnode/mgmt20.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt21.sim b/tests/script/unique/mnode/mgmt21.sim index 8409383309..44000de860 100644 --- a/tests/script/unique/mnode/mgmt21.sim +++ b/tests/script/unique/mnode/mgmt21.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt22.sim b/tests/script/unique/mnode/mgmt22.sim index 399805312b..415a40c21c 100644 --- a/tests/script/unique/mnode/mgmt22.sim +++ b/tests/script/unique/mnode/mgmt22.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt23.sim b/tests/script/unique/mnode/mgmt23.sim index 19c7b4ba76..1145c27188 100644 --- a/tests/script/unique/mnode/mgmt23.sim +++ b/tests/script/unique/mnode/mgmt23.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt24.sim b/tests/script/unique/mnode/mgmt24.sim index a7bcc59ac0..c68a7236f9 100644 --- a/tests/script/unique/mnode/mgmt24.sim +++ b/tests/script/unique/mnode/mgmt24.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt25.sim b/tests/script/unique/mnode/mgmt25.sim index 9cca9c8448..f9564f4f1a 100644 --- a/tests/script/unique/mnode/mgmt25.sim +++ b/tests/script/unique/mnode/mgmt25.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt26.sim b/tests/script/unique/mnode/mgmt26.sim index 2816845052..34bd3defba 100644 --- a/tests/script/unique/mnode/mgmt26.sim +++ b/tests/script/unique/mnode/mgmt26.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt30.sim b/tests/script/unique/mnode/mgmt30.sim index d0858c0d6c..3a6140539b 100644 --- a/tests/script/unique/mnode/mgmt30.sim +++ b/tests/script/unique/mnode/mgmt30.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt33.sim b/tests/script/unique/mnode/mgmt33.sim index ce7cdce35d..ad05cd4f6b 100644 --- a/tests/script/unique/mnode/mgmt33.sim +++ b/tests/script/unique/mnode/mgmt33.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmt34.sim b/tests/script/unique/mnode/mgmt34.sim index d8a46b0955..7f62b43fb8 100644 --- a/tests/script/unique/mnode/mgmt34.sim +++ b/tests/script/unique/mnode/mgmt34.sim @@ -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 diff --git a/tests/script/unique/mnode/mgmtr2.sim b/tests/script/unique/mnode/mgmtr2.sim index 5afb419058..fee2e405a2 100644 --- a/tests/script/unique/mnode/mgmtr2.sim +++ b/tests/script/unique/mnode/mgmtr2.sim @@ -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 diff --git a/tests/script/unique/vnode/many.sim b/tests/script/unique/vnode/many.sim index a9298b1cf2..24e2cd60c7 100644 --- a/tests/script/unique/vnode/many.sim +++ b/tests/script/unique/vnode/many.sim @@ -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 diff --git a/tests/script/unique/vnode/replica2_repeat.sim b/tests/script/unique/vnode/replica2_repeat.sim index ac68d59164..9845ef2d19 100644 --- a/tests/script/unique/vnode/replica2_repeat.sim +++ b/tests/script/unique/vnode/replica2_repeat.sim @@ -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 diff --git a/tests/script/unique/vnode/replica3_basic.sim b/tests/script/unique/vnode/replica3_basic.sim index 0ff42b523b..edb70b7d4c 100644 --- a/tests/script/unique/vnode/replica3_basic.sim +++ b/tests/script/unique/vnode/replica3_basic.sim @@ -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 diff --git a/tests/script/unique/vnode/replica3_repeat.sim b/tests/script/unique/vnode/replica3_repeat.sim index 636bc64f89..cde0c512a5 100644 --- a/tests/script/unique/vnode/replica3_repeat.sim +++ b/tests/script/unique/vnode/replica3_repeat.sim @@ -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 -- GitLab