fix invalid refcount
This commit is contained in:
parent
25f6ffd18d
commit
cf87dcbcff
|
@ -37,7 +37,6 @@ extern int32_t mqttDebugFlag;
|
|||
extern int32_t monDebugFlag;
|
||||
extern int32_t uDebugFlag;
|
||||
extern int32_t rpcDebugFlag;
|
||||
extern int32_t odbcDebugFlag;
|
||||
extern int32_t qDebugFlag;
|
||||
extern int32_t wDebugFlag;
|
||||
extern int32_t sDebugFlag;
|
||||
|
|
|
@ -117,7 +117,7 @@ typedef struct {
|
|||
int64_t rebootTime;
|
||||
int64_t lastAccessTime;
|
||||
int32_t accessTimes;
|
||||
int16_t numOfVnodes;
|
||||
int32_t numOfVnodes;
|
||||
int32_t numOfSupportVnodes;
|
||||
int32_t numOfCores;
|
||||
EDndReason offlineReason;
|
||||
|
|
|
@ -196,6 +196,8 @@ static SDnodeObj *mndAcquireDnodeByEp(SMnode *pMnode, char *pEpStr) {
|
|||
sdbCancelFetch(pSdb, pIter);
|
||||
return pDnode;
|
||||
}
|
||||
|
||||
sdbRelease(pSdb, pDnode);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -419,10 +421,9 @@ static int32_t mndCreateDnode(SMnode *pMnode, SMnodeMsg *pMsg, SCreateDnodeMsg *
|
|||
static int32_t mndProcessCreateDnodeMsg(SMnodeMsg *pMsg) {
|
||||
SMnode *pMnode = pMsg->pMnode;
|
||||
SCreateDnodeMsg *pCreate = pMsg->rpcMsg.pCont;
|
||||
|
||||
pCreate->port = htonl(pCreate->port);
|
||||
mDebug("dnode:%s:%d, start to create", pCreate->fqdn, pCreate->port);
|
||||
|
||||
pCreate->port = htonl(pCreate->port);
|
||||
if (pCreate->fqdn[0] == 0 || pCreate->port <= 0 || pCreate->port > UINT16_MAX) {
|
||||
terrno = TSDB_CODE_MND_INVALID_DNODE_EP;
|
||||
mError("dnode:%s:%d, failed to create since %s", pCreate->fqdn, pCreate->port, terrstr());
|
||||
|
|
|
@ -219,6 +219,7 @@ void mndGetMnodeEpSet(SMnode *pMnode, SEpSet *pEpSet) {
|
|||
}
|
||||
|
||||
pEpSet->numOfEps++;
|
||||
sdbRelease(pSdb, pObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@ int32_t mndTransAppendUndoAction(STrans *pTrans, STransAction *pAction) {
|
|||
static int32_t mndTransSync(SMnode *pMnode, STrans *pTrans) {
|
||||
SSdbRaw *pRaw = mndTransActionEncode(pTrans);
|
||||
if (pRaw == NULL) {
|
||||
mError("trans:%d, failed to decode trans since %s", pTrans->id, terrstr());
|
||||
mError("trans:%d, failed to encode while sync trans since %s", pTrans->id, terrstr());
|
||||
return -1;
|
||||
}
|
||||
sdbSetRawStatus(pRaw, SDB_STATUS_READY);
|
||||
|
@ -835,7 +835,7 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) {
|
|||
|
||||
SSdbRaw *pRaw = mndTransActionEncode(pTrans);
|
||||
if (pRaw == NULL) {
|
||||
mError("trans:%d, failed to decode trans since %s", pTrans->id, terrstr());
|
||||
mError("trans:%d, failed to encode while finish trans since %s", pTrans->id, terrstr());
|
||||
}
|
||||
sdbSetRawStatus(pRaw, SDB_STATUS_DROPPED);
|
||||
|
||||
|
|
Loading…
Reference in New Issue