feat: check server status
This commit is contained in:
parent
9e130aef6d
commit
07ae78392f
|
@ -256,7 +256,7 @@ static int32_t dmStartNodes(SDnode *pDnode) {
|
|||
}
|
||||
|
||||
dInfo("TDengine initialized successfully");
|
||||
dmReportStartup(pDnode, "TDengine", "initialized successfully", true);
|
||||
dmReportStartup(pDnode, "TDengine", "initialized successfully");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,6 @@ typedef struct {
|
|||
} SDnodeData;
|
||||
|
||||
typedef struct {
|
||||
bool finished;
|
||||
char name[TSDB_STEP_NAME_LEN];
|
||||
char desc[TSDB_STEP_DESC_LEN];
|
||||
} SStartupInfo;
|
||||
|
|
|
@ -34,7 +34,7 @@ const char *dmEventName(EDndEvent ev);
|
|||
void dmSetStatus(SDnode *pDnode, EDndRunStatus stat);
|
||||
void dmSetEvent(SDnode *pDnode, EDndEvent event);
|
||||
void dmSetMsgHandle(SMgmtWrapper *pWrapper, tmsg_t msgType, NodeMsgFp nodeMsgFp, int8_t vgId);
|
||||
void dmReportStartup(SDnode *pDnode, const char *pName, const char *pDesc, bool finished);
|
||||
void dmReportStartup(SDnode *pDnode, const char *pName, const char *pDesc);
|
||||
void dmProcessServerStatusReq(SDnode *pDnode, SRpcMsg *pMsg);
|
||||
void dmGetMonitorSysInfo(SMonSysInfo *pInfo);
|
||||
|
||||
|
|
|
@ -136,16 +136,10 @@ void dmReleaseWrapper(SMgmtWrapper *pWrapper) {
|
|||
dTrace("node:%s, is released, refCount:%d", pWrapper->name, refCount);
|
||||
}
|
||||
|
||||
void dmReportStartup(SDnode *pDnode, const char *pName, const char *pDesc, bool finished) {
|
||||
void dmReportStartup(SDnode *pDnode, const char *pName, const char *pDesc) {
|
||||
SStartupInfo *pStartup = &pDnode->startup;
|
||||
tstrncpy(pStartup->name, pName, TSDB_STEP_NAME_LEN);
|
||||
tstrncpy(pStartup->desc, pDesc, TSDB_STEP_DESC_LEN);
|
||||
pStartup->finished = false;
|
||||
}
|
||||
|
||||
static void dmGetStartup(SDnode *pDnode, SStartupInfo *pStartup) {
|
||||
memcpy(pStartup, &pDnode->startup, sizeof(SStartupInfo));
|
||||
pStartup->finished = (pDnode->status == DND_STAT_RUNNING);
|
||||
}
|
||||
|
||||
static void dmGetServerStatus(SDnode *pDnode, SServerStatusRsp *pStatus) {
|
||||
|
|
|
@ -130,7 +130,7 @@ static void *vmOpenVnodeFunc(void *param) {
|
|||
char stepDesc[TSDB_STEP_DESC_LEN] = {0};
|
||||
snprintf(stepDesc, TSDB_STEP_DESC_LEN, "vgId:%d, start to restore, %d of %d have been opened", pCfg->vgId,
|
||||
pMgmt->state.openVnodes, pMgmt->state.totalVnodes);
|
||||
dmReportStartup(pDnode, "open-vnodes", stepDesc, false);
|
||||
dmReportStartup(pDnode, "open-vnodes", stepDesc);
|
||||
|
||||
SMsgCb msgCb = pMgmt->pDnode->data.msgCb;
|
||||
msgCb.pWrapper = pMgmt->pWrapper;
|
||||
|
|
Loading…
Reference in New Issue