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

shm

上级 3e30f720
aux_source_directory(src DNODE_SRC)
aux_source_directory(mnodeMgmt/src DNODE_SRC)
add_library(dnode STATIC ${DNODE_SRC})
target_link_libraries(
dnode cjson mnode vnode qnode snode bnode wal sync taos tfs monitor
......@@ -7,6 +9,7 @@ target_include_directories(
dnode
PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/mgmt"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/mnodeMgmt/inc"
)
if(${BUILD_TEST})
......
......@@ -21,8 +21,10 @@ extern "C" {
#endif
#include "dndEnv.h"
int32_t dndInitMnode(SDnode *pDnode);
void dndCleanupMnode(SDnode *pDnode);
int32_t mmInit(SDnode *pDnode);
void mmCleanup(SDnode *pDnode);
////////////
int32_t dndGetUserAuthFromMnode(SDnode *pDnode, char *user, char *spi, char *encrypt, char *secret, char *ckey);
void dndProcessMnodeReadMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet);
......
......@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "dndMnode.h"
#include "mm.h"
#include "dndMgmt.h"
#include "dndTransport.h"
#include "dndWorker.h"
......@@ -611,7 +611,7 @@ void dndProcessMnodeReadMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
// dndWriteMnodeMsgToWorker(pDnode, &pDnode->mmgmt.readWorker, pMsg);
}
int32_t dndInitMnode(SDnode *pDnode) {
int32_t mmInit(SDnode *pDnode) {
dInfo("dnode-mnode start to init");
SMnodeMgmt *pMgmt = &pDnode->mmgmt;
taosInitRWLatch(&pMgmt->latch);
......@@ -645,7 +645,7 @@ int32_t dndInitMnode(SDnode *pDnode) {
}
}
void dndCleanupMnode(SDnode *pDnode) {
void mmCleanup(SDnode *pDnode) {
dInfo("dnode-mnode start to clean up");
SMnodeMgmt *pMgmt = &pDnode->mmgmt;
if (pMgmt->pMnode) {
......
......@@ -16,7 +16,7 @@
#define _DEFAULT_SOURCE
#include "dndBnode.h"
#include "dndMgmt.h"
#include "dndMnode.h"
#include "mm.h"
#include "dndQnode.h"
#include "dndSnode.h"
#include "dndTransport.h"
......@@ -221,7 +221,7 @@ SDnode *dndCreate(SDnodeObjCfg *pCfg) {
return NULL;
}
if (dndInitMnode(pDnode) != 0) {
if (mmInit(pDnode) != 0) {
dError("failed to init mnode since %s", terrstr());
dndClose(pDnode);
return NULL;
......@@ -253,7 +253,7 @@ void dndClose(SDnode *pDnode) {
dndSetStat(pDnode, DND_STAT_STOPPED);
dndCleanupTrans(pDnode);
dndStopMgmt(pDnode);
dndCleanupMnode(pDnode);
mmCleanup(pDnode);
dndCleanupBnode(pDnode);
dndCleanupSnode(pDnode);
dndCleanupQnode(pDnode);
......
......@@ -16,7 +16,7 @@
#define _DEFAULT_SOURCE
#include "dndMgmt.h"
#include "dndBnode.h"
#include "dndMnode.h"
#include "mm.h"
#include "dndQnode.h"
#include "dndSnode.h"
#include "dndTransport.h"
......
......@@ -22,7 +22,7 @@
#define _DEFAULT_SOURCE
#include "dndTransport.h"
#include "dndMgmt.h"
#include "dndMnode.h"
#include "mm.h"
#include "dndVnodes.h"
#define INTERNAL_USER "_dnd"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册