提交 ddc692b9 编写于 作者: S Shengliang Guan

refactor: adjust dnode logs

上级 24feb934
......@@ -23,7 +23,6 @@ static int32_t bmRequire(const SMgmtInputOpt *pInput, bool *required) {
static void bmInitOption(SBnodeMgmt *pMgmt, SBnodeOpt *pOption) { pOption->msgCb = pMgmt->msgCb; }
static void bmClose(SBnodeMgmt *pMgmt) {
dInfo("bnode-mgmt start to cleanup");
if (pMgmt->pBnode != NULL) {
bmStopWorker(pMgmt);
bndClose(pMgmt->pBnode);
......@@ -31,11 +30,9 @@ static void bmClose(SBnodeMgmt *pMgmt) {
}
taosMemoryFree(pMgmt);
dInfo("bnode-mgmt is cleaned up");
}
int32_t bmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
dInfo("bnode-mgmt start to init");
SBnodeMgmt *pMgmt = taosMemoryCalloc(1, sizeof(SBnodeMgmt));
if (pMgmt == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
......@@ -66,7 +63,6 @@ int32_t bmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
tmsgReportStartup("bnode-worker", "initialized");
pOutput->pMgmt = pMgmt;
dInfo("bnode-mgmt is initialized");
return 0;
}
......
......@@ -107,7 +107,6 @@ int32_t mmAlter(SMnodeMgmt *pMgmt, SDAlterMnodeReq *pReq) {
}
static void mmClose(SMnodeMgmt *pMgmt) {
dInfo("mnode-mgmt start to cleanup");
if (pMgmt->pMnode != NULL) {
mmStopWorker(pMgmt);
mndClose(pMgmt->pMnode);
......@@ -115,11 +114,9 @@ static void mmClose(SMnodeMgmt *pMgmt) {
}
taosMemoryFree(pMgmt);
dInfo("mnode-mgmt is cleaned up");
}
static int32_t mmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
dInfo("mnode-mgmt start to init");
if (walInit() != 0) {
dError("failed to init wal since %s", terrstr());
return -1;
......@@ -183,7 +180,6 @@ static int32_t mmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
pInput->pData->dnodeId = pMgmt->dnodeId;
pOutput->pMgmt = pMgmt;
dInfo("mnode-mgmt is initialized");
return 0;
}
......
......@@ -23,7 +23,6 @@ static int32_t qmRequire(const SMgmtInputOpt *pInput, bool *required) {
static void qmInitOption(SQnodeMgmt *pMgmt, SQnodeOpt *pOption) { pOption->msgCb = pMgmt->msgCb; }
static void qmClose(SQnodeMgmt *pMgmt) {
dInfo("qnode-mgmt start to cleanup");
if (pMgmt->pQnode != NULL) {
qmStopWorker(pMgmt);
qndClose(pMgmt->pQnode);
......@@ -31,11 +30,9 @@ static void qmClose(SQnodeMgmt *pMgmt) {
}
taosMemoryFree(pMgmt);
dInfo("qnode-mgmt is cleaned up");
}
static int32_t qmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
dInfo("qnode-mgmt start to init");
SQnodeMgmt *pMgmt = taosMemoryCalloc(1, sizeof(SQnodeMgmt));
if (pMgmt == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
......@@ -75,7 +72,6 @@ static int32_t qmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
tmsgReportStartup("qnode-worker", "initialized");
pOutput->pMgmt = pMgmt;
dInfo("qnode-mgmt is initialized");
return 0;
}
......
......@@ -24,7 +24,6 @@ static int32_t smRequire(const SMgmtInputOpt *pInput, bool *required) {
static void smInitOption(SSnodeMgmt *pMgmt, SSnodeOpt *pOption) { pOption->msgCb = pMgmt->msgCb; }
static void smClose(SSnodeMgmt *pMgmt) {
dInfo("snode-mgmt start to cleanup");
if (pMgmt->pSnode != NULL) {
smStopWorker(pMgmt);
sndClose(pMgmt->pSnode);
......@@ -32,11 +31,9 @@ static void smClose(SSnodeMgmt *pMgmt) {
}
taosMemoryFree(pMgmt);
dInfo("snode-mgmt is cleaned up");
}
int32_t smOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
dInfo("snode-mgmt start to init");
SSnodeMgmt *pMgmt = taosMemoryCalloc(1, sizeof(SSnodeMgmt));
if (pMgmt == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
......
......@@ -234,18 +234,14 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) {
}
static void vmCleanup(SVnodeMgmt *pMgmt) {
dInfo("vnode-mgmt start to cleanup");
vmCloseVnodes(pMgmt);
vmStopWorker(pMgmt);
vnodeCleanup();
tfsClose(pMgmt->pTfs);
taosMemoryFree(pMgmt);
dInfo("vnode-mgmt is cleaned up");
}
static int32_t vmInit(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
dInfo("vnode-mgmt start to init");
int32_t code = -1;
SVnodeMgmt *pMgmt = taosMemoryCalloc(1, sizeof(SVnodeMgmt));
......@@ -323,7 +319,6 @@ static int32_t vmInit(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
_OVER:
if (code == 0) {
pOutput->pMgmt = pMgmt;
dInfo("vnodes-mgmt is initialized");
} else {
dError("failed to init vnodes-mgmt since %s", terrstr());
vmCleanup(pMgmt);
......@@ -338,7 +333,6 @@ static int32_t vmRequire(const SMgmtInputOpt *pInput, bool *required) {
}
static int32_t vmStart(SVnodeMgmt *pMgmt) {
dDebug("vnode-mgmt start to run");
taosRLockLatch(&pMgmt->latch);
void *pIter = taosHashIterate(pMgmt->hash, NULL);
......
......@@ -54,7 +54,7 @@ static int32_t dmInitVars(SDnode *pDnode, const SDnodeOpt *pOption) {
} else {
pDnode->ptype = DND_PROC_CHILD;
SMgmtWrapper *pWrapper = &pDnode->wrappers[pDnode->rtype];
dInfo("dnode will run in child-process mode, node:%s", pWrapper->name);
dInfo("dnode will run in child-process mode, node:%s", dmNodeName(pDnode->rtype));
}
SDnodeData *pData = &pDnode->data;
......@@ -181,12 +181,12 @@ SDnode *dmCreate(const SDnodeOpt *pOption) {
goto _OVER;
}
pWrapper->required = dmRequireNode(pWrapper);
if (ntype != DNODE && dmReadShmFile(pWrapper->path, pWrapper->name, pDnode->rtype, &pWrapper->proc.shm) != 0) {
dError("node:%s, failed to read shm file since %s", pWrapper->name, terrstr());
goto _OVER;
}
pWrapper->required = dmRequireNode(pWrapper);
}
if (dmInitMsgHandle(pDnode) != 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册