enh: add dropping status for vgroups
This commit is contained in:
parent
10c8a60147
commit
fb140a285e
|
@ -665,18 +665,23 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p
|
|||
if (i < pVgroup->replica) {
|
||||
colDataAppend(pColInfo, numOfRows, (const char *)&pVgroup->vnodeGid[i].dnodeId, false);
|
||||
|
||||
bool exist = false;
|
||||
bool online = false;
|
||||
SDnodeObj *pDnode = mndAcquireDnode(pMnode, pVgroup->vnodeGid[i].dnodeId);
|
||||
if (pDnode != NULL) {
|
||||
exist = true;
|
||||
online = mndIsDnodeOnline(pDnode, curMs);
|
||||
mndReleaseDnode(pMnode, pDnode);
|
||||
}
|
||||
|
||||
char buf1[20] = {0};
|
||||
char role[20] = "offline";
|
||||
if (online) {
|
||||
if (!exist) {
|
||||
strcpy(role, "dropping");
|
||||
} else if (online) {
|
||||
bool show = (pVgroup->vnodeGid[i].syncState == TAOS_SYNC_STATE_LEADER && !pVgroup->vnodeGid[i].syncRestore);
|
||||
snprintf(role, sizeof(role), "%s%s", syncStr(pVgroup->vnodeGid[i].syncState), show ? "*" : "");
|
||||
} else {
|
||||
}
|
||||
STR_WITH_MAXSIZE_TO_VARSTR(buf1, role, pShow->pMeta->pSchemas[cols].bytes);
|
||||
|
||||
|
|
|
@ -658,7 +658,7 @@
|
|||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 -n 3
|
||||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6
|
||||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 -n 3
|
||||
,,,system-test,python3 ./test.py -f 6-cluster/5dnode3mnodeDrop.py -N 5
|
||||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeDrop.py -N 5
|
||||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRecreateMnode.py -N 5 -M 3
|
||||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeStopFollowerLeader.py -N 5 -M 3
|
||||
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeStop2Follower.py -N 5 -M 3
|
||||
|
|
Loading…
Reference in New Issue