diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 3fb22f7f8da900fb45c0e875b66072a2ac7f6fc0..4e20e574991c86c5464c30fec0ef39dcb459ecfd 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2220,9 +2220,7 @@ int tscProcessAlterTableMsgRsp(SSqlObj *pSql) { if (pTableMetaInfo->pTableMeta) { bool isSuperTable = UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo); - taosCacheRelease(tscCacheHandle, (void **)&(pTableMetaInfo->pTableMeta), true); -// taosCacheRelease(tscCacheHandle, (void **)&(pTableMetaInfo->pMetricMeta), true); if (isSuperTable) { // if it is a super table, reset whole query cache tscTrace("%p reset query cache since table:%s is stable", pSql, pTableMetaInfo->name); diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index ddc41e52e52705d2838bef337996f50708bc23c0..3bc931a855876fff6e7630f6324d0e1a7261bbb8 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1662,12 +1662,13 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) { */ if (code != TSDB_CODE_SUCCESS) { if (trsupport->numOfRetry++ >= MAX_NUM_OF_SUBQUERY_RETRY) { - tscTrace("%p sub:%p reach the max retry times, set global code:%d", pParentSql, pSql, code); + tscTrace("%p sub:%p reach the max retry times, set global code:%s", pParentSql, pSql, tstrerror(code)); atomic_val_compare_exchange_32(&pState->code, 0, code); } else { // does not reach the maximum retry time, go on tscTrace("%p sub:%p failed code:%s, retry:%d", pParentSql, pSql, tstrerror(code), trsupport->numOfRetry); SSqlObj *pNew = tscCreateSqlObjForSubquery(pParentSql, trsupport, pSql); + if (pNew == NULL) { tscError("%p sub:%p failed to create new subquery due to out of memory, abort retry, vgId:%d, orderOfSub:%d", trsupport->pParentSqlObj, pSql, pVgroup->vgId, trsupport->subqueryIndex); @@ -1677,7 +1678,8 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) { } else { SQueryInfo *pNewQueryInfo = tscGetQueryInfoDetail(&pNew->cmd, 0); assert(pNewQueryInfo->pTableMetaInfo[0]->pTableMeta != NULL); - + + taos_free_result(pSql); tscProcessSql(pNew); return; }