This commit is contained in:
parent
b5421c1421
commit
96329ea18c
|
@ -1400,7 +1400,7 @@ void tscUpdateVnodeInSubmitMsg(SSqlObj *pSql, char *buf) {
|
|||
|
||||
pShellMsg = (SShellSubmitMsg *)pMsg;
|
||||
pShellMsg->vnode = htons(pMeterMeta->vpeerDesc[pSql->index].vnode);
|
||||
tscTrace("%p update submit msg vnode:%d", pSql, htons(pShellMsg->vnode));
|
||||
tscTrace("%p update submit msg vnode:%s:%d", pSql, taosIpStr(pMeterMeta->vpeerDesc[pSql->index].ip), htons(pShellMsg->vnode));
|
||||
}
|
||||
|
||||
int tscBuildSubmitMsg(SSqlObj *pSql) {
|
||||
|
@ -1421,7 +1421,7 @@ int tscBuildSubmitMsg(SSqlObj *pSql) {
|
|||
|
||||
// pSql->cmd.payloadLen is set during parse sql routine, so we do not use it here
|
||||
pSql->cmd.msgType = TSDB_MSG_TYPE_SUBMIT;
|
||||
tscTrace("%p update submit msg vnode:%d", pSql, htons(pShellMsg->vnode));
|
||||
tscTrace("%p update submit msg vnode:%s:%d", pSql, taosIpStr(pMeterMeta->vpeerDesc[pMeterMeta->index].ip), htons(pShellMsg->vnode));
|
||||
|
||||
return msgLen;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ int mgmtGetConns(SShowObj *pShow, SConnObj *pConn) {
|
|||
pConn = pAcct->pConn;
|
||||
SConnInfo *pConnInfo = pConnShow->connInfo;
|
||||
|
||||
while (pConn) {
|
||||
while (pConn && pConn->pUser) {
|
||||
strcpy(pConnInfo->user, pConn->pUser->user);
|
||||
pConnInfo->ip = pConn->ip;
|
||||
pConnInfo->port = pConn->port;
|
||||
|
|
|
@ -40,6 +40,7 @@ void *mgmtVgroupActionAfterBatchUpdate(void *row, char *str, int size, int *ssiz
|
|||
void *mgmtVgroupActionReset(void *row, char *str, int size, int *ssize);
|
||||
void *mgmtVgroupActionDestroy(void *row, char *str, int size, int *ssize);
|
||||
bool mgmtCheckVnodeReady(SDnodeObj *pDnode, SVgObj *pVgroup, SVnodeGid *pVnode);
|
||||
char *mgmtGetVnodeStatus(SVgObj *pVgroup, SVnodeGid *pVnode);
|
||||
|
||||
void mgmtVgroupActionInit() {
|
||||
mgmtVgroupActionFp[SDB_TYPE_INSERT] = mgmtVgroupActionInsert;
|
||||
|
@ -328,8 +329,8 @@ int mgmtRetrieveVgroups(SShowObj *pShow, char *data, int rows, SConnObj *pConn)
|
|||
|
||||
pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows;
|
||||
if (pVgroup->vnodeGid[i].ip != 0) {
|
||||
bool ready = mgmtCheckVnodeReady(NULL, pVgroup, pVgroup->vnodeGid + i);
|
||||
strcpy(pWrite, ready ? "ready" : "unsynced");
|
||||
char *vnodeStatus = mgmtGetVnodeStatus(pVgroup, pVgroup->vnodeGid + i);
|
||||
strcpy(pWrite, vnodeStatus);
|
||||
} else {
|
||||
strcpy(pWrite, "null");
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ bool mgmtCheckModuleInDnode(SDnodeObj *pDnode, int moduleType) {
|
|||
return tsModule[moduleType].num != 0;
|
||||
}
|
||||
|
||||
char *mgmtGetVnodeStatus(SVgObj *pVgroup, SVnodeGid *pVnode) { return "master"; }
|
||||
|
||||
bool mgmtCheckVnodeReady(SDnodeObj *pDnode, SVgObj *pVgroup, SVnodeGid *pVnode) { return true; }
|
||||
|
||||
void mgmtUpdateDnodeState(SDnodeObj *pDnode, int lbStatus) {}
|
||||
|
|
Loading…
Reference in New Issue