feat/TS-5805-force-assign-leader-token

This commit is contained in:
dmchen 2025-02-12 08:20:56 +00:00
parent 977372d376
commit ee0c280fe6
3 changed files with 3 additions and 2 deletions

View File

@ -863,7 +863,7 @@ cmd ::= KILL COMPACT NK_INTEGER(A).
/************************************************ merge/redistribute/ vgroup ******************************************/
cmd ::= BALANCE VGROUP. { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
cmd ::= BALANCE LEADER FORCE. { pCxt->pRootNode = createAssignLeaderStmt(pCxt); }
cmd ::= ASSIGN LEADER FORCE. { pCxt->pRootNode = createAssignLeaderStmt(pCxt); }
cmd ::= BALANCE VGROUP LEADER on_vgroup_id(A). { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &A); }
cmd ::= BALANCE VGROUP LEADER DATABASE db_name(A). { pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &A); }

View File

@ -359,6 +359,7 @@ static SKeyword keywordTable[] = {
{"ON_FAILURE", TK_ON_FAILURE},
{"NOTIFY_HISTORY", TK_NOTIFY_HISTORY},
{"REGEXP", TK_REGEXP},
{"ASSIGN", TK_ASSIGN},
};
// clang-format on

View File

@ -77,7 +77,7 @@ class TDTestCase(TBase):
tdLog.exit("wait candidate failed")
return
tdSql.execute("BALANCE LEADER FORCE;")
tdSql.execute("ASSIGN LEADER FORCE;")
count = 0
while count < 100: