chore: remove assert
This commit is contained in:
parent
207c7aded0
commit
c95c67e168
|
@ -3708,7 +3708,6 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
|
||||||
|
|
||||||
int32_t msgSize = tSerializeSMqSeekReq(NULL, 0, &req);
|
int32_t msgSize = tSerializeSMqSeekReq(NULL, 0, &req);
|
||||||
if (msgSize < 0) {
|
if (msgSize < 0) {
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3719,7 +3718,6 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
|
||||||
|
|
||||||
if (tSerializeSMqSeekReq(msg, msgSize, &req) < 0) {
|
if (tSerializeSMqSeekReq(msg, msgSize, &req) < 0) {
|
||||||
taosMemoryFree(msg);
|
taosMemoryFree(msg);
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1414,7 +1414,6 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
|
||||||
pScanBaseInfo->cond.twindows.skey = oldSkey;
|
pScanBaseInfo->cond.twindows.skey = oldSkey;
|
||||||
} else {
|
} else {
|
||||||
qError("invalid pOffset->type:%d, %s", pOffset->type, id);
|
qError("invalid pOffset->type:%d, %s", pOffset->type, id);
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1433,7 +1432,6 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
|
||||||
|
|
||||||
if (pAPI->snapshotFn.setForSnapShot(sContext, pOffset->uid) != 0) {
|
if (pAPI->snapshotFn.setForSnapShot(sContext, pOffset->uid) != 0) {
|
||||||
qError("setDataForSnapShot error. uid:%" PRId64 " , %s", pOffset->uid, id);
|
qError("setDataForSnapShot error. uid:%" PRId64 " , %s", pOffset->uid, id);
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,6 @@ int32_t extractOperatorInTree(SOperatorInfo* pOperator, int32_t type, const char
|
||||||
|
|
||||||
if (pOperator == NULL) {
|
if (pOperator == NULL) {
|
||||||
qError("invalid operator, failed to find tableScanOperator %s", id);
|
qError("invalid operator, failed to find tableScanOperator %s", id);
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,6 @@ static int32_t findAndReplaceNode(SCalcConstContext* pCxt, SNode** pRoot, SNode*
|
||||||
nodesRewriteExprPostOrder(pRoot, doFindAndReplaceNode, pCxt);
|
nodesRewriteExprPostOrder(pRoot, doFindAndReplaceNode, pCxt);
|
||||||
if (TSDB_CODE_SUCCESS == pCxt->code && strict && !pCxt->replaceCxt.replaced) {
|
if (TSDB_CODE_SUCCESS == pCxt->code && strict && !pCxt->replaceCxt.replaced) {
|
||||||
parserError("target replace node not found, %p", pTarget);
|
parserError("target replace node not found, %p", pTarget);
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
return pCxt->code;
|
return pCxt->code;
|
||||||
|
|
|
@ -175,7 +175,6 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, const char** pSql, E
|
||||||
} else {
|
} else {
|
||||||
pSchema = pTableMeta->schema;
|
pSchema = pTableMeta->schema;
|
||||||
if (pBoundInfo->numOfCols != getTbnameSchemaIndex(pTableMeta) + 1) {
|
if (pBoundInfo->numOfCols != getTbnameSchemaIndex(pTableMeta) + 1) {
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2868,7 +2868,6 @@ static int32_t rewriteSystemInfoFunc(STranslateContext* pCxt, SNode** pNode) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3075,7 +3074,6 @@ static int32_t rewriteClientPseudoColumnFunc(STranslateContext* pCxt, SNode** pN
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -850,7 +850,6 @@ static int32_t putMetaDataToHash(const char* pKey, int32_t len, const SArray* pD
|
||||||
int32_t getMetaDataFromHash(const char* pKey, int32_t len, SHashObj* pHash, void** pOutput) {
|
int32_t getMetaDataFromHash(const char* pKey, int32_t len, SHashObj* pHash, void** pOutput) {
|
||||||
SMetaRes** pRes = taosHashGet(pHash, pKey, len);
|
SMetaRes** pRes = taosHashGet(pHash, pKey, len);
|
||||||
if (NULL == pRes || NULL == *pRes) {
|
if (NULL == pRes || NULL == *pRes) {
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
if (TSDB_CODE_SUCCESS == (*pRes)->code) {
|
if (TSDB_CODE_SUCCESS == (*pRes)->code) {
|
||||||
|
@ -1350,7 +1349,6 @@ int32_t getTsmaFromCache(SParseMetaCache* pMetaCache, const SName* pTsmaName, ST
|
||||||
code = getMetaDataFromHash(tsmaFName, strlen(tsmaFName), pMetaCache->pTSMAs, (void**)&pTsmaRsp);
|
code = getMetaDataFromHash(tsmaFName, strlen(tsmaFName), pMetaCache->pTSMAs, (void**)&pTsmaRsp);
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
if (!pTsmaRsp || pTsmaRsp->pTsmas->size != 1) {
|
if (!pTsmaRsp || pTsmaRsp->pTsmas->size != 1) {
|
||||||
assert(0);
|
|
||||||
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
return TSDB_CODE_PAR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
*pTsma = taosArrayGetP(pTsmaRsp->pTsmas, 0);
|
*pTsma = taosArrayGetP(pTsmaRsp->pTsmas, 0);
|
||||||
|
|
Loading…
Reference in New Issue