fix:[TD-32166] change createRequest to buildRequest to avoid printing error because request not in pRequests hash
This commit is contained in:
parent
5a6e13c360
commit
c54855cdd9
|
@ -163,7 +163,7 @@ static void buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* sche
|
|||
}
|
||||
RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "tags", tags));
|
||||
|
||||
end:
|
||||
end:
|
||||
*pJson = json;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ static int32_t setCompressOption(cJSON* json, uint32_t para) {
|
|||
return code;
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
return code;
|
||||
}
|
||||
static void buildAlterSTableJson(void* alterData, int32_t alterDataLen, cJSON** pJson) {
|
||||
|
@ -338,7 +338,7 @@ static void buildAlterSTableJson(void* alterData, int32_t alterDataLen, cJSON**
|
|||
break;
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
tFreeSMAltertbReq(&req);
|
||||
*pJson = json;
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ static void processCreateStb(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
}
|
||||
buildCreateTableJson(&req.schemaRow, &req.schemaTag, req.name, req.suid, TSDB_SUPER_TABLE, &req.colCmpr, pJson);
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("create stable return");
|
||||
tDecoderClear(&coder);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ static void processAlterStb(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
}
|
||||
buildAlterSTableJson(req.alterOriData, req.alterOriDataLen, pJson);
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("alter stable return");
|
||||
tDecoderClear(&coder);
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ static void buildChildElement(cJSON* json, SVCreateTbReq* pCreateReq) {
|
|||
RAW_FALSE_CHECK(cJSON_AddItemToArray(tags, tag));
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "tags", tags));
|
||||
taosArrayDestroy(pTagVals);
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ static void buildCreateCTableJson(SVCreateTbReq* pCreateReq, int32_t nReqs, cJSO
|
|||
}
|
||||
RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "createList", createList));
|
||||
|
||||
end:
|
||||
end:
|
||||
*pJson = json;
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,7 @@ static void processCreateTable(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
}
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("create table return");
|
||||
tDeleteSVCreateTbBatchReq(&req);
|
||||
tDecoderClear(&decoder);
|
||||
|
@ -585,7 +585,7 @@ static void processAutoCreateTable(SMqDataRsp* rsp, char** string) {
|
|||
*string = cJSON_PrintUnformatted(pJson);
|
||||
cJSON_Delete(pJson);
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("auto created table return, sql json:%s", *string);
|
||||
for (int i = 0; decoder && pCreateReq && i < rsp->createTableNum; i++) {
|
||||
tDecoderClear(&decoder[i]);
|
||||
|
@ -773,7 +773,7 @@ static void processAlterTable(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
break;
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("alter table return");
|
||||
tDecoderClear(&decoder);
|
||||
*pJson = json;
|
||||
|
@ -808,7 +808,7 @@ static void processDropSTable(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
RAW_NULL_CHECK(tableName);
|
||||
RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "tableName", tableName));
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("processDropSTable return");
|
||||
tDecoderClear(&decoder);
|
||||
*pJson = json;
|
||||
|
@ -844,7 +844,7 @@ static void processDeleteTable(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
RAW_NULL_CHECK(sqlJson);
|
||||
RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "sql", sqlJson));
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("processDeleteTable return");
|
||||
tDecoderClear(&coder);
|
||||
*pJson = json;
|
||||
|
@ -881,7 +881,7 @@ static void processDropTable(SMqMetaRsp* metaRsp, cJSON** pJson) {
|
|||
}
|
||||
RAW_FALSE_CHECK(cJSON_AddItemToObject(json, "tableNameList", tableNameList));
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("processDropTable return");
|
||||
tDecoderClear(&decoder);
|
||||
*pJson = json;
|
||||
|
@ -989,7 +989,7 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
|
||||
code = pRequest->code;
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " create stable return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
destroyRequest(pRequest);
|
||||
tFreeSMCreateStbReq(&pReq);
|
||||
|
@ -1023,9 +1023,9 @@ static int32_t taosDropStb(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
SCatalog* pCatalog = NULL;
|
||||
RAW_RETURN_CHECK(catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog));
|
||||
SRequestConnInfo conn = {.pTrans = pRequest->pTscObj->pAppInfo->pTransporter,
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pRequest->pTscObj->pAppInfo->mgmtEp)};
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pRequest->pTscObj->pAppInfo->mgmtEp)};
|
||||
SName pName = {0};
|
||||
toName(pRequest->pTscObj->acctId, pRequest->pDb, req.name, &pName);
|
||||
STableMeta* pTableMeta = NULL;
|
||||
|
@ -1088,7 +1088,7 @@ static int32_t taosDropStb(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
|
||||
code = pRequest->code;
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " drop stable return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
destroyRequest(pRequest);
|
||||
tDecoderClear(&coder);
|
||||
|
@ -1142,9 +1142,9 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
taosHashSetFreeFp(pVgroupHashmap, destroyCreateTbReqBatch);
|
||||
|
||||
SRequestConnInfo conn = {.pTrans = pTscObj->pAppInfo->pTransporter,
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
|
||||
|
||||
pRequest->tableList = taosArrayInit(req.nReqs, sizeof(SName));
|
||||
RAW_NULL_CHECK(pRequest->tableList);
|
||||
|
@ -1269,7 +1269,7 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
|
||||
code = pRequest->code;
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " create table return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
tDeleteSVCreateTbBatchReq(&req);
|
||||
|
||||
|
@ -1328,9 +1328,9 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
taosHashSetFreeFp(pVgroupHashmap, destroyDropTbReqBatch);
|
||||
|
||||
SRequestConnInfo conn = {.pTrans = pTscObj->pAppInfo->pTransporter,
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
|
||||
pRequest->tableList = taosArrayInit(req.nReqs, sizeof(SName));
|
||||
RAW_NULL_CHECK(pRequest->tableList);
|
||||
// loop to create table
|
||||
|
@ -1395,7 +1395,7 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
}
|
||||
code = pRequest->code;
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " drop table return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
taosHashCleanup(pVgroupHashmap);
|
||||
destroyRequest(pRequest);
|
||||
|
@ -1433,7 +1433,7 @@ static int32_t taosDeleteData(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
}
|
||||
taos_free_result(res);
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug("connId:0x%" PRIx64 " delete data sql:%s, code:%s", *(int64_t*)taos, sql, tstrerror(code));
|
||||
tDecoderClear(&coder);
|
||||
return code;
|
||||
|
@ -1473,9 +1473,9 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
SCatalog* pCatalog = NULL;
|
||||
RAW_RETURN_CHECK(catalogGetHandle(pTscObj->pAppInfo->clusterId, &pCatalog));
|
||||
SRequestConnInfo conn = {.pTrans = pTscObj->pAppInfo->pTransporter,
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
|
||||
.requestId = pRequest->requestId,
|
||||
.requestObjRefId = pRequest->self,
|
||||
.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp)};
|
||||
|
||||
SVgroupInfo pInfo = {0};
|
||||
SName pName = {0};
|
||||
|
@ -1543,7 +1543,7 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) {
|
|||
code = handleAlterTbExecRes(pRes->res, pCatalog);
|
||||
}
|
||||
}
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " alter table return, meta:%p, len:%d, msg:%s", LOG_ID_VALUE, meta, metaLen, tstrerror(code));
|
||||
taosArrayDestroy(pArray);
|
||||
if (pVgData) taosMemoryFreeClear(pVgData->pData);
|
||||
|
@ -1608,7 +1608,7 @@ int taos_write_raw_block_with_fields_with_reqid(TAOS* taos, int rows, char* pDat
|
|||
launchQueryImpl(pRequest, pQuery, true, NULL);
|
||||
code = pRequest->code;
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " write raw block with field return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
taosMemoryFreeClear(pTableMeta);
|
||||
qDestroyQuery(pQuery);
|
||||
|
@ -1668,7 +1668,7 @@ int taos_write_raw_block_with_reqid(TAOS* taos, int rows, char* pData, const cha
|
|||
launchQueryImpl(pRequest, pQuery, true, NULL);
|
||||
code = pRequest->code;
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " write raw block return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
taosMemoryFreeClear(pTableMeta);
|
||||
qDestroyQuery(pQuery);
|
||||
|
@ -1719,7 +1719,7 @@ static int32_t buildCreateTbMap(SMqDataRsp* rsp, SHashObj* pHashObj) {
|
|||
}
|
||||
return 0;
|
||||
|
||||
end:
|
||||
end:
|
||||
tDecoderClear(&decoderTmp);
|
||||
tDestroySVCreateTbReq(&pCreateReq, TSDB_MSG_FLG_DECODE);
|
||||
return code;
|
||||
|
@ -1826,7 +1826,7 @@ static int32_t getRawCache(SHashObj** pVgHash, SHashObj** pNameHash, SHashObj**
|
|||
}
|
||||
|
||||
return 0;
|
||||
end:
|
||||
end:
|
||||
taosHashCleanup(*pMetaHash);
|
||||
taosHashCleanup(*pNameHash);
|
||||
taosHashCleanup(*pVgHash);
|
||||
|
@ -1848,7 +1848,7 @@ static int32_t buildRawRequest(TAOS* taos, SRequestObj** pRequest, SCatalog** pC
|
|||
conn->requestObjRefId = (*pRequest)->self;
|
||||
conn->mgmtEps = getEpSet_s(&(*pRequest)->pTscObj->pAppInfo->mgmtEp);
|
||||
|
||||
end:
|
||||
end:
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -1925,7 +1925,7 @@ static int32_t processCacheMeta(SHashObj* pVgHash, SHashObj* pNameHash, SHashObj
|
|||
}
|
||||
*pMeta = pTableMeta;
|
||||
|
||||
end:
|
||||
end:
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -1993,7 +1993,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) {
|
|||
break;
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " write raw data return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
tDeleteMqDataRsp(&rspObj.dataRsp);
|
||||
tDecoderClear(&decoder);
|
||||
|
@ -2075,7 +2075,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen)
|
|||
break;
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
uDebug(LOG_ID_TAG " write raw metadata return, msg:%s", LOG_ID_VALUE, tstrerror(code));
|
||||
tDeleteSTaosxRsp(&rspObj.dataRsp);
|
||||
void* pIter = taosHashIterate(pCreateTbHash, NULL);
|
||||
|
@ -2150,7 +2150,7 @@ static void processBatchMetaToJson(SMqBatchMetaRsp* pMsgRsp, char** string) {
|
|||
*string = fullStr;
|
||||
return;
|
||||
|
||||
end:
|
||||
end:
|
||||
cJSON_Delete(pJson);
|
||||
tDeleteMqBatchMetaRsp(&rsp);
|
||||
}
|
||||
|
@ -2233,7 +2233,7 @@ static int32_t encodeMqDataRsp(__encode_func__* encodeFunc, SMqDataRsp* rspObj,
|
|||
raw->raw = buf;
|
||||
raw->raw_len = len;
|
||||
return code;
|
||||
FAILED:
|
||||
FAILED:
|
||||
tEncoderClear(&encoder);
|
||||
taosMemoryFree(buf);
|
||||
return code;
|
||||
|
@ -2377,7 +2377,7 @@ static int32_t tmqWriteBatchMetaDataImpl(TAOS* taos, void* meta, int32_t metaLen
|
|||
}
|
||||
}
|
||||
|
||||
end:
|
||||
end:
|
||||
tDeleteMqBatchMetaRsp(&rsp);
|
||||
return code;
|
||||
}
|
Loading…
Reference in New Issue