shm
This commit is contained in:
parent
b168766ff2
commit
afad08d106
|
@ -99,9 +99,9 @@ typedef struct SMgmtWrapper {
|
||||||
SShm shm;
|
SShm shm;
|
||||||
void *pMgmt;
|
void *pMgmt;
|
||||||
SDnode *pDnode;
|
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;
|
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;
|
} SMgmtWrapper;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -214,8 +214,12 @@ static int32_t dndRunInParentProcess(SDnode *pDnode) {
|
||||||
|
|
||||||
static int32_t dndRunInChildProcess(SDnode *pDnode) {
|
static int32_t dndRunInChildProcess(SDnode *pDnode) {
|
||||||
dInfo("dnode start to run in child process");
|
dInfo("dnode start to run in child process");
|
||||||
|
|
||||||
SMgmtWrapper *pWrapper = &pDnode->wrappers[pDnode->ntype];
|
SMgmtWrapper *pWrapper = &pDnode->wrappers[pDnode->ntype];
|
||||||
|
|
||||||
|
SMsgCb msgCb = dndCreateMsgcb(pWrapper);
|
||||||
|
tmsgSetDefaultMsgCb(&msgCb);
|
||||||
|
pWrapper->procType = PROC_CHILD;
|
||||||
|
|
||||||
if (dndOpenNode(pWrapper) != 0) {
|
if (dndOpenNode(pWrapper) != 0) {
|
||||||
dError("node:%s, failed to start since %s", pWrapper->name, terrstr());
|
dError("node:%s, failed to start since %s", pWrapper->name, terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -236,13 +240,19 @@ static int32_t dndRunInChildProcess(SDnode *pDnode) {
|
||||||
.isChild = true,
|
.isChild = true,
|
||||||
.name = pWrapper->name};
|
.name = pWrapper->name};
|
||||||
|
|
||||||
pWrapper->procType = PROC_CHILD;
|
|
||||||
pWrapper->pProc = taosProcInit(&cfg);
|
pWrapper->pProc = taosProcInit(&cfg);
|
||||||
if (pWrapper->pProc == NULL) {
|
if (pWrapper->pProc == NULL) {
|
||||||
dError("node:%s, failed to create proc since %s", pWrapper->name, terrstr());
|
dError("node:%s, failed to create proc since %s", pWrapper->name, terrstr());
|
||||||
return -1;
|
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) {
|
if (taosProcRun(pWrapper->pProc) != 0) {
|
||||||
dError("node:%s, failed to run proc since %s", pWrapper->name, terrstr());
|
dError("node:%s, failed to run proc since %s", pWrapper->name, terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue