error str
This commit is contained in:
parent
cb9162609e
commit
116fc722b5
|
@ -37,7 +37,7 @@ int32_t mndInitShow(SMnode *pMnode) {
|
||||||
pMgmt->cache = taosCacheInit(TSDB_DATA_TYPE_INT, 5000, true, (__cache_free_fn_t)mndFreeShowObj, "show");
|
pMgmt->cache = taosCacheInit(TSDB_DATA_TYPE_INT, 5000, true, (__cache_free_fn_t)mndFreeShowObj, "show");
|
||||||
if (pMgmt->cache == NULL) {
|
if (pMgmt->cache == NULL) {
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
mError("failed to alloc show cache since %s", terrstr());
|
mError("failed to alloc show cache since %s", tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ static SShowObj *mndCreateShowObj(SMnode *pMnode, SRetrieveTableReq *pReq) {
|
||||||
SShowObj *pShow = taosCachePut(pMgmt->cache, &showId, sizeof(int64_t), &showObj, size, keepTime);
|
SShowObj *pShow = taosCachePut(pMgmt->cache, &showId, sizeof(int64_t), &showObj, size, keepTime);
|
||||||
if (pShow == NULL) {
|
if (pShow == NULL) {
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
mError("show:0x%" PRIx64 ", failed to put into cache since %s", showId, terrstr());
|
mError("show:0x%" PRIx64 ", failed to put into cache since %s", showId, tstrerror(code));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
|
||||||
pMeta = taosHashGet(pMnode->perfsMeta, retrieveReq.tb, strlen(retrieveReq.tb));
|
pMeta = taosHashGet(pMnode->perfsMeta, retrieveReq.tb, strlen(retrieveReq.tb));
|
||||||
if (pMeta == NULL) {
|
if (pMeta == NULL) {
|
||||||
code = TSDB_CODE_PAR_TABLE_NOT_EXIST;
|
code = TSDB_CODE_PAR_TABLE_NOT_EXIST;
|
||||||
mError("failed to process show-retrieve req:%p since %s", pShow, terrstr());
|
mError("failed to process show-retrieve req:%p since %s", pShow, tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
|
||||||
pShow = mndCreateShowObj(pMnode, &retrieveReq);
|
pShow = mndCreateShowObj(pMnode, &retrieveReq);
|
||||||
if (pShow == NULL) {
|
if (pShow == NULL) {
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
mError("failed to process show-meta req since %s", terrstr());
|
mError("failed to process show-meta req since %s", tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
|
||||||
pShow = mndAcquireShowObj(pMnode, retrieveReq.showId);
|
pShow = mndAcquireShowObj(pMnode, retrieveReq.showId);
|
||||||
if (pShow == NULL) {
|
if (pShow == NULL) {
|
||||||
code = TSDB_CODE_MND_INVALID_SHOWOBJ;
|
code = TSDB_CODE_MND_INVALID_SHOWOBJ;
|
||||||
mError("failed to process show-retrieve req:%p since %s", pShow, terrstr());
|
mError("failed to process show-retrieve req:%p since %s", pShow, tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
|
||||||
if (retrieveFp == NULL) {
|
if (retrieveFp == NULL) {
|
||||||
mndReleaseShowObj(pShow, false);
|
mndReleaseShowObj(pShow, false);
|
||||||
code = TSDB_CODE_MSG_NOT_PROCESSED;
|
code = TSDB_CODE_MSG_NOT_PROCESSED;
|
||||||
mError("show:0x%" PRIx64 ", failed to retrieve data since %s", pShow->id, terrstr());
|
mError("show:0x%" PRIx64 ", failed to retrieve data since %s", pShow->id, tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
|
||||||
if (pRsp == NULL) {
|
if (pRsp == NULL) {
|
||||||
mndReleaseShowObj(pShow, false);
|
mndReleaseShowObj(pShow, false);
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
mError("show:0x%" PRIx64 ", failed to retrieve data since %s", pShow->id, terrstr());
|
mError("show:0x%" PRIx64 ", failed to retrieve data since %s", pShow->id, tstrerror(code));
|
||||||
blockDataDestroy(pBlock);
|
blockDataDestroy(pBlock);
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
|
@ -664,7 +664,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((code = mndAllocSmaVgroup(pMnode, pDb, &streamObj.fixedSinkVg)) != 0) {
|
if ((code = mndAllocSmaVgroup(pMnode, pDb, &streamObj.fixedSinkVg)) != 0) {
|
||||||
mError("sma:%s, failed to create since %s", smaObj.name, terrstr());
|
mError("sma:%s, failed to create since %s", smaObj.name, tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
smaObj.dstVgId = streamObj.fixedSinkVg.vgId;
|
smaObj.dstVgId = streamObj.fixedSinkVg.vgId;
|
||||||
|
@ -846,7 +846,7 @@ static int32_t mndProcessCreateSmaReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||||
mError("sma:%s, failed to create since %s", createReq.name, terrstr());
|
mError("sma:%s, failed to create since %s", createReq.name, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
mndReleaseStb(pMnode, pStb);
|
mndReleaseStb(pMnode, pStb);
|
||||||
|
@ -991,14 +991,14 @@ static int32_t mndDropSma(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SSmaObj *p
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
} else {
|
} else {
|
||||||
if ((code = mndStreamSetDropAction(pMnode, pTrans, pStream)) < 0) {
|
if ((code = mndStreamSetDropAction(pMnode, pTrans, pStream)) < 0) {
|
||||||
mError("stream:%s, failed to drop task since %s", pStream->name, terrstr());
|
mError("stream:%s, failed to drop task since %s", pStream->name, tstrerror(code));
|
||||||
sdbRelease(pMnode->pSdb, pStream);
|
sdbRelease(pMnode->pSdb, pStream);
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
// drop stream
|
// drop stream
|
||||||
if ((code = mndPersistTransLog(pStream, pTrans, SDB_STATUS_DROPPED)) < 0) {
|
if ((code = mndPersistTransLog(pStream, pTrans, SDB_STATUS_DROPPED)) < 0) {
|
||||||
mError("stream:%s, failed to drop log since %s", pStream->name, terrstr());
|
mError("stream:%s, failed to drop log since %s", pStream->name, tstrerror(code));
|
||||||
sdbRelease(pMnode->pSdb, pStream);
|
sdbRelease(pMnode->pSdb, pStream);
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
@ -1047,7 +1047,7 @@ int32_t mndDropSmasByStb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SStbObj *p
|
||||||
SStreamObj *pStream = mndAcquireStream(pMnode, streamName);
|
SStreamObj *pStream = mndAcquireStream(pMnode, streamName);
|
||||||
if (pStream != NULL && pStream->smaId == pSma->uid) {
|
if (pStream != NULL && pStream->smaId == pSma->uid) {
|
||||||
if ((code = mndStreamSetDropAction(pMnode, pTrans, pStream)) < 0) {
|
if ((code = mndStreamSetDropAction(pMnode, pTrans, pStream)) < 0) {
|
||||||
mError("stream:%s, failed to drop task since %s", pStream->name, terrstr());
|
mError("stream:%s, failed to drop task since %s", pStream->name, tstrerror(code));
|
||||||
mndReleaseStream(pMnode, pStream);
|
mndReleaseStream(pMnode, pStream);
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
@ -1144,7 +1144,7 @@ static int32_t mndProcessDropSmaReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||||
mError("sma:%s, failed to drop since %s", dropReq.name, terrstr());
|
mError("sma:%s, failed to drop since %s", dropReq.name, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
mndReleaseSma(pMnode, pSma);
|
mndReleaseSma(pMnode, pSma);
|
||||||
|
@ -1300,7 +1300,7 @@ static int32_t mndProcessGetSmaReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("failed to get index %s since %s", indexReq.indexFName, terrstr());
|
mError("failed to get index %s since %s", indexReq.indexFName, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
|
@ -1346,7 +1346,7 @@ static int32_t mndProcessGetTbSmaReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("failed to get table index %s since %s", indexReq.tbFName, terrstr());
|
mError("failed to get table index %s since %s", indexReq.tbFName, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
tFreeSerializeSTableIndexRsp(&rsp);
|
tFreeSerializeSTableIndexRsp(&rsp);
|
||||||
|
@ -1852,7 +1852,7 @@ static int32_t mndProcessCreateTSMAReq(SRpcMsg* pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||||
mError("tsma:%s, failed to create since %s", createReq.name, terrstr());
|
mError("tsma:%s, failed to create since %s", createReq.name, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pStb) mndReleaseStb(pMnode, pStb);
|
if (pStb) mndReleaseStb(pMnode, pStb);
|
||||||
|
|
|
@ -332,7 +332,7 @@ static int32_t mndProcessCreateSnodeReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||||
mError("snode:%d, failed to create since %s", createReq.dnodeId, terrstr());
|
mError("snode:%d, failed to create since %s", createReq.dnodeId, tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ static int32_t mndProcessDropSnodeReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
_OVER:
|
_OVER:
|
||||||
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||||
mError("snode:%d, failed to drop since %s", dropReq.dnodeId, terrstr());
|
mError("snode:%d, failed to drop since %s", dropReq.dnodeId, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
mndReleaseSnode(pMnode, pObj);
|
mndReleaseSnode(pMnode, pObj);
|
||||||
|
|
Loading…
Reference in New Issue