refactor(cluster): replace the keyword master/slave with LEADER FOLLOWER
This commit is contained in:
parent
7d8e418de2
commit
5f6eac8e47
|
@ -78,13 +78,13 @@ void mndReleaseMnode(SMnode *pMnode, SMnodeObj *pObj) {
|
|||
const char *mndGetRoleStr(int32_t showType) {
|
||||
switch (showType) {
|
||||
case TAOS_SYNC_STATE_FOLLOWER:
|
||||
return "unsynced";
|
||||
return "FOLLOWER";
|
||||
case TAOS_SYNC_STATE_CANDIDATE:
|
||||
return "slave";
|
||||
return "CANDIDATE";
|
||||
case TAOS_SYNC_STATE_LEADER:
|
||||
return "master";
|
||||
return "LEADER";
|
||||
default:
|
||||
return "undefined";
|
||||
return "ERROR";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -71,7 +71,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -76,7 +76,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -71,7 +71,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -71,7 +71,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/cfg.sh -n dnode1 -c wallevel -v 2
|
||||
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
|
||||
|
||||
print ========= start dnode1 as master
|
||||
print ========= start dnode1 as LEADER
|
||||
system sh/exec.sh -n dnode1 -s start
|
||||
sleep 2000
|
||||
sql connect
|
||||
|
|
|
@ -24,7 +24,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -71,7 +71,7 @@ if $data00 != 1 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != master then
|
||||
if $data02 != LEADER then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
Loading…
Reference in New Issue