link command to implementation
This commit is contained in:
parent
7ab11c42f4
commit
3fab2201a0
|
@ -174,6 +174,7 @@ SArray *mmGetMsgHandles() {
|
|||
if (dmSetMgmtHandle(pArray, TDMT_MND_SERVER_VERSION, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
|
||||
if (dmSetMgmtHandle(pArray, TDMT_MND_CREATE_INDEX, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||
if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_INDEX, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||
if (dmSetMgmtHandle(pArray, TDMT_MND_RESTORE_DNODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||
|
||||
if (dmSetMgmtHandle(pArray, TDMT_SCH_QUERY, mmPutMsgToQueryQueue, 1) == NULL) goto _OVER;
|
||||
if (dmSetMgmtHandle(pArray, TDMT_SCH_MERGE_QUERY, mmPutMsgToQueryQueue, 1) == NULL) goto _OVER;
|
||||
|
|
|
@ -58,6 +58,7 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq);
|
|||
static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq);
|
||||
static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp);
|
||||
static int32_t mndProcessStatusReq(SRpcMsg *pReq);
|
||||
static int32_t mndProcessRestoreDnodeReq(SRpcMsg *pReq);
|
||||
|
||||
static int32_t mndRetrieveConfigs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows);
|
||||
static void mndCancelGetNextConfig(SMnode *pMnode, void *pIter);
|
||||
|
@ -83,6 +84,7 @@ int32_t mndInitDnode(SMnode *pMnode) {
|
|||
mndSetMsgHandle(pMnode, TDMT_MND_STATUS, mndProcessStatusReq);
|
||||
mndSetMsgHandle(pMnode, TDMT_MND_DNODE_LIST, mndProcessDnodeListReq);
|
||||
mndSetMsgHandle(pMnode, TDMT_MND_SHOW_VARIABLES, mndProcessShowVariablesReq);
|
||||
mndSetMsgHandle(pMnode, TDMT_MND_RESTORE_DNODE, mndProcessRestoreDnodeReq);
|
||||
|
||||
mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_CONFIGS, mndRetrieveConfigs);
|
||||
mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_CONFIGS, mndCancelGetNextConfig);
|
||||
|
@ -859,12 +861,6 @@ int32_t mndProcessRestoreDnodeReq(SRpcMsg *pReq){
|
|||
|
||||
#ifndef TD_ENTERPRISE
|
||||
int32_t mndProcessRestoreDnodeReqImpl(SRpcMsg *pReq){
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq) {
|
||||
SMnode *pMnode = pReq->info.node;
|
||||
int32_t code = -1;
|
||||
SDnodeObj *pDnode = NULL;
|
||||
|
@ -878,13 +874,14 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq) {
|
|||
goto _OVER;
|
||||
}
|
||||
|
||||
mInfo("dnode:%d, start to restore, ep:%s:%d", restoreReq.dnodeId, restoreReq.fqdn, restoreReq.port);
|
||||
//mInfo("dnode:%d, start to restore, ep:%s:%d", restoreReq.dnodeId, restoreReq.fqdn, restoreReq.port);
|
||||
mInfo("dnode:%d, start to restore", restoreReq.dnodeId);
|
||||
if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_DROP_MNODE) != 0) {
|
||||
goto _OVER;
|
||||
}
|
||||
|
||||
pDnode = mndAcquireDnode(pMnode, restoreReq.dnodeId);
|
||||
if (pDnode == NULL) {
|
||||
/*if (pDnode == NULL) {
|
||||
int32_t err = terrno;
|
||||
char ep[TSDB_EP_LEN + 1] = {0};
|
||||
snprintf(ep, sizeof(ep), restoreReq.fqdn, restoreReq.port);
|
||||
|
@ -894,6 +891,10 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq) {
|
|||
goto _OVER;
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (pDnode == NULL) {
|
||||
goto _OVER;
|
||||
}
|
||||
|
||||
code = mndRestoreDnode(pMnode, pReq, pDnode, restoreReq.restoreType);
|
||||
if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS;
|
||||
|
@ -906,7 +907,7 @@ _OVER:
|
|||
mndReleaseDnode(pMnode, pDnode);
|
||||
return code;
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
static int32_t mndDropDnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode, SMnodeObj *pMObj, SQnodeObj *pQObj,
|
||||
SSnodeObj *pSObj, int32_t numOfVnodes, bool force) {
|
||||
|
|
Loading…
Reference in New Issue