fix add mnode error
This commit is contained in:
parent
69a559164a
commit
ac19d3726e
|
@ -39,6 +39,7 @@
|
||||||
void *tsDnodeSdb = NULL;
|
void *tsDnodeSdb = NULL;
|
||||||
int32_t tsDnodeUpdateSize = 0;
|
int32_t tsDnodeUpdateSize = 0;
|
||||||
int32_t tsAccessSquence = 0;
|
int32_t tsAccessSquence = 0;
|
||||||
|
extern void * tsMnodeSdb;
|
||||||
extern void * tsVgroupSdb;
|
extern void * tsVgroupSdb;
|
||||||
|
|
||||||
static int32_t mgmtCreateDnode(uint32_t ip);
|
static int32_t mgmtCreateDnode(uint32_t ip);
|
||||||
|
@ -101,7 +102,13 @@ static int32_t mgmtDnodeActionDelete(SSdbOper *pOper) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mgmtDropMnode(pDnode->dnodeId);
|
SMnodeObj *pMnode = mgmtGetMnode(pDnode->dnodeId);
|
||||||
|
if (pMnode != NULL) {
|
||||||
|
SSdbOper oper = {.type = SDB_OPER_LOCAL, .table = tsMnodeSdb, .pObj = pMnode};
|
||||||
|
sdbDeleteRow(&oper);
|
||||||
|
mgmtReleaseMnode(pMnode);
|
||||||
|
}
|
||||||
|
|
||||||
balanceNotify();
|
balanceNotify();
|
||||||
|
|
||||||
mTrace("dnode:%d, all vgroups:%d is dropped from sdb", pDnode->dnodeId, numOfVgroups);
|
mTrace("dnode:%d, all vgroups:%d is dropped from sdb", pDnode->dnodeId, numOfVgroups);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "mgmtShell.h"
|
#include "mgmtShell.h"
|
||||||
#include "mgmtUser.h"
|
#include "mgmtUser.h"
|
||||||
|
|
||||||
static void * tsMnodeSdb = NULL;
|
void * tsMnodeSdb = NULL;
|
||||||
static int32_t tsMnodeUpdateSize = 0;
|
static int32_t tsMnodeUpdateSize = 0;
|
||||||
static int32_t mgmtGetMnodeMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn);
|
static int32_t mgmtGetMnodeMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn);
|
||||||
static int32_t mgmtRetrieveMnodes(SShowObj *pShow, char *data, int32_t rows, void *pConn);
|
static int32_t mgmtRetrieveMnodes(SShowObj *pShow, char *data, int32_t rows, void *pConn);
|
||||||
|
|
|
@ -397,6 +397,7 @@ void monitorSaveAcctLog(char *acctId, int64_t currentPointsPerSecond, int64_t ma
|
||||||
int64_t totalOutbound, int64_t maxOutbound, int64_t totalDbs, int64_t maxDbs,
|
int64_t totalOutbound, int64_t maxOutbound, int64_t totalDbs, int64_t maxDbs,
|
||||||
int64_t totalUsers, int64_t maxUsers, int64_t totalStreams, int64_t maxStreams,
|
int64_t totalUsers, int64_t maxUsers, int64_t totalStreams, int64_t maxStreams,
|
||||||
int64_t totalConns, int64_t maxConns, int8_t accessState) {
|
int64_t totalConns, int64_t maxConns, int8_t accessState) {
|
||||||
|
if (monitor == NULL) return;
|
||||||
if (monitor->state != MONITOR_STATE_INITIALIZED) return;
|
if (monitor->state != MONITOR_STATE_INITIALIZED) return;
|
||||||
|
|
||||||
char sql[1024] = {0};
|
char sql[1024] = {0};
|
||||||
|
|
Loading…
Reference in New Issue