shm
This commit is contained in:
parent
b168766ff2
commit
afad08d106
|
@ -99,9 +99,9 @@ typedef struct SMgmtWrapper {
|
|||
SShm shm;
|
||||
void *pMgmt;
|
||||
SDnode *pDnode;
|
||||
NodeMsgFp msgFps[TDMT_MAX];
|
||||
int8_t msgVgIds[TDMT_MAX]; // Handle the case where the same message type is distributed to qnode or vnode
|
||||
SMgmtFp fp;
|
||||
int8_t msgVgIds[TDMT_MAX]; // Handle the case where the same message type is distributed to qnode or vnode
|
||||
NodeMsgFp msgFps[TDMT_MAX];
|
||||
} SMgmtWrapper;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -214,8 +214,12 @@ static int32_t dndRunInParentProcess(SDnode *pDnode) {
|
|||
|
||||
static int32_t dndRunInChildProcess(SDnode *pDnode) {
|
||||
dInfo("dnode start to run in child process");
|
||||
|
||||
SMgmtWrapper *pWrapper = &pDnode->wrappers[pDnode->ntype];
|
||||
|
||||
SMsgCb msgCb = dndCreateMsgcb(pWrapper);
|
||||
tmsgSetDefaultMsgCb(&msgCb);
|
||||
pWrapper->procType = PROC_CHILD;
|
||||
|
||||
if (dndOpenNode(pWrapper) != 0) {
|
||||
dError("node:%s, failed to start since %s", pWrapper->name, terrstr());
|
||||
return -1;
|
||||
|
@ -236,13 +240,19 @@ static int32_t dndRunInChildProcess(SDnode *pDnode) {
|
|||
.isChild = true,
|
||||
.name = pWrapper->name};
|
||||
|
||||
pWrapper->procType = PROC_CHILD;
|
||||
pWrapper->pProc = taosProcInit(&cfg);
|
||||
if (pWrapper->pProc == NULL) {
|
||||
dError("node:%s, failed to create proc since %s", pWrapper->name, terrstr());
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pWrapper->fp.startFp != NULL) {
|
||||
if ((*pWrapper->fp.startFp)(pWrapper) != 0) {
|
||||
dError("node:%s, failed to start since %s", pWrapper->name, terrstr());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (taosProcRun(pWrapper->pProc) != 0) {
|
||||
dError("node:%s, failed to run proc since %s", pWrapper->name, terrstr());
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue