refactor: node mgmt
This commit is contained in:
parent
447c9504a3
commit
dd87e8f7b9
|
@ -195,8 +195,6 @@ static int32_t dmRunDnode() {
|
|||
int32_t code = dmRun(pDnode);
|
||||
dInfo("start shutting down the service");
|
||||
|
||||
global.pDnode = NULL;
|
||||
dmClose(pDnode);
|
||||
dmCleanup();
|
||||
taosCloseLog();
|
||||
taosCleanupCfg();
|
||||
|
|
|
@ -203,7 +203,10 @@ void dmCloseNode(SMgmtWrapper *pWrapper) {
|
|||
}
|
||||
|
||||
taosWLockLatch(&pWrapper->latch);
|
||||
(*pWrapper->func.closeFp)(pWrapper->pMgmt);
|
||||
if (pWrapper->pMgmt != NULL) {
|
||||
(*pWrapper->func.closeFp)(pWrapper->pMgmt);
|
||||
pWrapper->pMgmt = NULL;
|
||||
}
|
||||
taosWUnLockLatch(&pWrapper->latch);
|
||||
|
||||
if (pWrapper->procObj) {
|
||||
|
@ -334,6 +337,7 @@ int32_t dmRun(SDnode *pDnode) {
|
|||
dmSetStatus(pDnode, DND_STAT_STOPPED);
|
||||
dmStopNodes(pDnode);
|
||||
dmCloseNodes(pDnode);
|
||||
dmClose(pDnode);
|
||||
return 0;
|
||||
} else {
|
||||
dmWatchNodes(pDnode);
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define fnFatal(...) { if (fnDebugFlag & DEBUG_FATAL) { taosPrintLog("FN FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }}
|
||||
#define fnError(...) { if (fnDebugFlag & DEBUG_ERROR) { taosPrintLog("FN ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }}
|
||||
#define fnWarn(...) { if (fnDebugFlag & DEBUG_WARN) { taosPrintLog("FN WARN ", DEBUG_WARN, 255, __VA_ARGS__); }}
|
||||
#define fnInfo(...) { if (fnDebugFlag & DEBUG_INFO) { taosPrintLog("FN ", DEBUG_INFO, 255, __VA_ARGS__); }}
|
||||
#define fnDebug(...) { if (fnDebugFlag & DEBUG_DEBUG) { taosPrintLog("FN ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }}
|
||||
#define fnTrace(...) { if (fnDebugFlag & DEBUG_TRACE) { taosPrintLog("FN ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }}
|
||||
#define fnFatal(...) { if (fnDebugFlag & DEBUG_FATAL) { taosPrintLog("FN FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }}
|
||||
#define fnError(...) { if (fnDebugFlag & DEBUG_ERROR) { taosPrintLog("FN ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }}
|
||||
#define fnWarn(...) { if (fnDebugFlag & DEBUG_WARN) { taosPrintLog("FN WARN ", DEBUG_WARN, 255, __VA_ARGS__); }}
|
||||
#define fnInfo(...) { if (fnDebugFlag & DEBUG_INFO) { taosPrintLog("FN ", DEBUG_INFO, 255, __VA_ARGS__); }}
|
||||
#define fnDebug(...) { if (fnDebugFlag & DEBUG_DEBUG) { taosPrintLog("FN ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }}
|
||||
#define fnTrace(...) { if (fnDebugFlag & DEBUG_TRACE) { taosPrintLog("FN ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue