add network error
This commit is contained in:
parent
a4827ad086
commit
f464aec00a
|
@ -468,6 +468,8 @@ int32_t taosGetErrSize();
|
|||
#define TSDB_CODE_DNODE_INVALID_TTL_CHG_ON_WR TAOS_DEF_ERROR_CODE(0, 0x0427)
|
||||
#define TSDB_CODE_DNODE_INVALID_EN_WHITELIST TAOS_DEF_ERROR_CODE(0, 0x0428)
|
||||
#define TSDB_CODE_DNODE_INVALID_MONITOR_PARAS TAOS_DEF_ERROR_CODE(0, 0x0429)
|
||||
#define TSDB_CODE_MNODE_STOPPED TAOS_DEF_ERROR_CODE(0, 0x042A)
|
||||
|
||||
|
||||
// mnode-sma
|
||||
#define TSDB_CODE_MND_SMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0480)
|
||||
|
|
|
@ -22,7 +22,7 @@ static inline int32_t mmAcquire(SMnodeMgmt *pMgmt) {
|
|||
int32_t code = 0;
|
||||
(void)taosThreadRwlockRdlock(&pMgmt->lock);
|
||||
if (pMgmt->stopped) {
|
||||
code = -1;
|
||||
code = TSDB_CODE_MNODE_STOPPED;
|
||||
} else {
|
||||
(void)atomic_add_fetch_32(&pMgmt->refCount, 1);
|
||||
}
|
||||
|
@ -134,16 +134,19 @@ int32_t mmPutMsgToReadQueue(SMnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
|||
}
|
||||
|
||||
int32_t mmPutMsgToQueryQueue(SMnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||
int32_t code = 0;
|
||||
if (NULL == pMgmt->pMnode) {
|
||||
const STraceId *trace = &pMsg->info.traceId;
|
||||
dGError("msg:%p, stop to pre-process in mnode since mnode is NULL, type:%s", pMsg, TMSG_INFO(pMsg->msgType));
|
||||
return -1;
|
||||
code = TSDB_CODE_MNODE_NOT_FOUND;
|
||||
dGError("msg:%p, stop to pre-process in mnode since %s, type:%s", pMsg, tstrerror(code), TMSG_INFO(pMsg->msgType));
|
||||
return code;
|
||||
}
|
||||
pMsg->info.node = pMgmt->pMnode;
|
||||
if (mndPreProcessQueryMsg(pMsg) != 0) {
|
||||
if ((code = mndPreProcessQueryMsg(pMsg)) != 0) {
|
||||
const STraceId *trace = &pMsg->info.traceId;
|
||||
dGError("msg:%p, failed to pre-process in mnode since %s, type:%s", pMsg, terrstr(), TMSG_INFO(pMsg->msgType));
|
||||
return -1;
|
||||
dGError("msg:%p, failed to pre-process in mnode since %s, type:%s", pMsg, tstrerror(code),
|
||||
TMSG_INFO(pMsg->msgType));
|
||||
return code;
|
||||
}
|
||||
return mmPutMsgToWorker(pMgmt, &pMgmt->queryWorker, pMsg);
|
||||
}
|
||||
|
|
|
@ -389,6 +389,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_CHARSET, "charset not match")
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_LOCALE, "locale not match")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_TTL_CHG_ON_WR, "ttlChangeOnWrite not match")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_EN_WHITELIST, "enableWhiteList not match")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_STOPPED, "enableWhiteList not match")
|
||||
|
||||
// vnode
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_VND_INVALID_VGROUP_ID, "Vnode is closed or removed")
|
||||
|
|
Loading…
Reference in New Issue