fix:add hashIteratorCancel for hash iterator
This commit is contained in:
parent
607132c18a
commit
d322cfce50
|
@ -1073,6 +1073,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
taosHashCancelIterate(info->superTables, tmp);
|
||||||
taosHashCleanup(hashTmp);
|
taosHashCleanup(hashTmp);
|
||||||
taosMemoryFreeClear(pTableMeta);
|
taosMemoryFreeClear(pTableMeta);
|
||||||
catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1);
|
catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1);
|
||||||
|
@ -1434,6 +1435,7 @@ static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
code = smlCheckAuth(info, &conn, pName.tname, AUTH_TYPE_WRITE);
|
code = smlCheckAuth(info, &conn, pName.tname, AUTH_TYPE_WRITE);
|
||||||
if(code != TSDB_CODE_SUCCESS){
|
if(code != TSDB_CODE_SUCCESS){
|
||||||
taosMemoryFree(measure);
|
taosMemoryFree(measure);
|
||||||
|
taosHashCancelIterate(info->childTables, oneTable);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1442,6 +1444,7 @@ static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
uError("SML:0x%" PRIx64 " catalogGetTableHashVgroup failed. table name: %s", info->id, tableData->childTableName);
|
uError("SML:0x%" PRIx64 " catalogGetTableHashVgroup failed. table name: %s", info->id, tableData->childTableName);
|
||||||
taosMemoryFree(measure);
|
taosMemoryFree(measure);
|
||||||
|
taosHashCancelIterate(info->childTables, oneTable);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
taosHashPut(info->pVgHash, (const char *)&vg.vgId, sizeof(vg.vgId), (char *)&vg, sizeof(vg));
|
taosHashPut(info->pVgHash, (const char *)&vg.vgId, sizeof(vg.vgId), (char *)&vg, sizeof(vg));
|
||||||
|
@ -1451,6 +1454,7 @@ static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
if (unlikely(NULL == pMeta || NULL == (*pMeta)->tableMeta)) {
|
if (unlikely(NULL == pMeta || NULL == (*pMeta)->tableMeta)) {
|
||||||
uError("SML:0x%" PRIx64 " NULL == pMeta. table name: %s", info->id, tableData->childTableName);
|
uError("SML:0x%" PRIx64 " NULL == pMeta. table name: %s", info->id, tableData->childTableName);
|
||||||
taosMemoryFree(measure);
|
taosMemoryFree(measure);
|
||||||
|
taosHashCancelIterate(info->childTables, oneTable);
|
||||||
return TSDB_CODE_SML_INTERNAL_ERROR;
|
return TSDB_CODE_SML_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1466,6 +1470,7 @@ static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
taosMemoryFree(measure);
|
taosMemoryFree(measure);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
uError("SML:0x%" PRIx64 " smlBindData failed", info->id);
|
uError("SML:0x%" PRIx64 " smlBindData failed", info->id);
|
||||||
|
taosHashCancelIterate(info->childTables, oneTable);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, oneTable);
|
oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, oneTable);
|
||||||
|
|
|
@ -905,6 +905,7 @@ int32_t tdProcessRSmaSubmit(SSma *pSma, int64_t version, void *pReq, void *pMsg,
|
||||||
tb_uid_t *pTbSuid = (tb_uid_t *)taosHashGetKey(pIter, NULL);
|
tb_uid_t *pTbSuid = (tb_uid_t *)taosHashGetKey(pIter, NULL);
|
||||||
if (tdExecuteRSmaAsync(pSma, version, pMsg, len, inputType, *pTbSuid) < 0) {
|
if (tdExecuteRSmaAsync(pSma, version, pMsg, len, inputType, *pTbSuid) < 0) {
|
||||||
smaError("vgId:%d, failed to process rsma submit exec 2 since: %s", SMA_VID(pSma), terrstr());
|
smaError("vgId:%d, failed to process rsma submit exec 2 since: %s", SMA_VID(pSma), terrstr());
|
||||||
|
taosHashCancelIterate(uidStore.uidHash, pIter);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1095,6 +1095,7 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) {
|
||||||
if(ret != TDB_CODE_SUCCESS) {
|
if(ret != TDB_CODE_SUCCESS) {
|
||||||
tqError("qGetTableList in tqUpdateTbUidList error:%d handle %s consumer:0x%" PRIx64, ret, pTqHandle->subKey, pTqHandle->consumerId);
|
tqError("qGetTableList in tqUpdateTbUidList error:%d handle %s consumer:0x%" PRIx64, ret, pTqHandle->subKey, pTqHandle->consumerId);
|
||||||
taosArrayDestroy(list);
|
taosArrayDestroy(list);
|
||||||
|
taosHashCancelIterate(pTq->pHandle, pIter);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
tqReaderSetTbUidList(pTqHandle->execHandle.pTqReader, list, NULL);
|
tqReaderSetTbUidList(pTqHandle->execHandle.pTqReader, list, NULL);
|
||||||
|
|
Loading…
Reference in New Issue