commit
17689c464b
|
@ -62,6 +62,7 @@ typedef struct SRpcHandleInfo {
|
|||
|
||||
SRpcConnInfo conn;
|
||||
int8_t forbiddenIp;
|
||||
int8_t notFreeAhandle;
|
||||
|
||||
} SRpcHandleInfo;
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "mndTrans.h"
|
||||
#include "mndSubscribe.h"
|
||||
#include "mndDb.h"
|
||||
#include "mndPrivilege.h"
|
||||
#include "mndShow.h"
|
||||
#include "mndStb.h"
|
||||
#include "mndSubscribe.h"
|
||||
#include "mndSync.h"
|
||||
#include "mndUser.h"
|
||||
|
||||
|
@ -810,7 +810,8 @@ static bool mndCheckTransConflict(SMnode *pMnode, STrans *pNew) {
|
|||
if (strcasecmp(pNew->dbname, pTrans->dbname) == 0) conflict = true;
|
||||
}
|
||||
if (pTrans->conflict == TRN_CONFLICT_TOPIC_INSIDE) {
|
||||
if (strcasecmp(pNew->dbname, pTrans->dbname) == 0 && strcasecmp(pNew->stbname, pTrans->stbname) == 0) conflict = true;
|
||||
if (strcasecmp(pNew->dbname, pTrans->dbname) == 0 && strcasecmp(pNew->stbname, pTrans->stbname) == 0)
|
||||
conflict = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1142,6 +1143,7 @@ static int32_t mndTransSendSingleMsg(SMnode *pMnode, STrans *pTrans, STransActio
|
|||
return -1;
|
||||
}
|
||||
rpcMsg.info.traceId.rootId = pTrans->mTraceId;
|
||||
rpcMsg.info.notFreeAhandle = 1;
|
||||
|
||||
memcpy(rpcMsg.pCont, pAction->pCont, pAction->contLen);
|
||||
|
||||
|
@ -1253,9 +1255,9 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA
|
|||
|
||||
for (int32_t action = 0; action < numOfActions; ++action) {
|
||||
STransAction *pAction = taosArrayGet(pArray, action);
|
||||
mDebug("trans:%d, %s:%d Sent:%d, Received:%d, errCode:0x%x, acceptableCode:0x%x, retryCode:0x%x",
|
||||
pTrans->id, mndTransStr(pAction->stage), pAction->id, pAction->msgSent, pAction->msgReceived,
|
||||
pAction->errCode, pAction->acceptableCode, pAction->retryCode);
|
||||
mDebug("trans:%d, %s:%d Sent:%d, Received:%d, errCode:0x%x, acceptableCode:0x%x, retryCode:0x%x", pTrans->id,
|
||||
mndTransStr(pAction->stage), pAction->id, pAction->msgSent, pAction->msgReceived, pAction->errCode,
|
||||
pAction->acceptableCode, pAction->retryCode);
|
||||
if (pAction->msgSent) {
|
||||
if (pAction->msgReceived) {
|
||||
if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) {
|
||||
|
|
|
@ -892,7 +892,7 @@ int32_t schCloneCallbackParam(SSchCallbackParamHeader *pSrc, SSchCallbackParamHe
|
|||
int32_t schCloneSMsgSendInfo(void *src, void **dst) {
|
||||
SMsgSendInfo *pSrc = src;
|
||||
int32_t code = 0;
|
||||
SMsgSendInfo *pDst = taosMemoryMalloc(sizeof(*pSrc));
|
||||
SMsgSendInfo *pDst = taosMemoryCalloc(1, sizeof(*pSrc));
|
||||
if (NULL == pDst) {
|
||||
qError("malloc SMsgSendInfo for rpcCtx failed, len:%d", (int32_t)sizeof(*pSrc));
|
||||
SCH_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||
|
|
|
@ -322,7 +322,7 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) {
|
|||
if (msg != NULL && msg->ctx != NULL && msg->ctx->ahandle != (void*)0x9527) {
|
||||
if (conn->ctx.freeFunc != NULL && msg->ctx->ahandle != NULL) {
|
||||
conn->ctx.freeFunc(msg->ctx->ahandle);
|
||||
} else if (msg->ctx->ahandle != NULL && pThrd->destroyAhandleFp != NULL) {
|
||||
} else if (msg->msg.info.notFreeAhandle == 0 && msg->ctx->ahandle != NULL && pThrd->destroyAhandleFp != NULL) {
|
||||
tDebug("%s conn %p destroy unfinished ahandle %p", CONN_GET_INST_LABEL(conn), conn, msg->ctx->ahandle);
|
||||
pThrd->destroyAhandleFp(msg->ctx->ahandle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue