[td-1641]
This commit is contained in:
parent
83f8316e70
commit
6a88d306c8
|
@ -1516,9 +1516,6 @@ static void tscFreeSubSqlObj(SRetrieveSupport *trsupport, SSqlObj *pSql) {
|
||||||
SSqlObj *pParentSql = trsupport->pParentSql;
|
SSqlObj *pParentSql = trsupport->pParentSql;
|
||||||
|
|
||||||
assert(pSql == pParentSql->pSubs[index]);
|
assert(pSql == pParentSql->pSubs[index]);
|
||||||
pParentSql->pSubs[index] = NULL;
|
|
||||||
|
|
||||||
taos_free_result(pSql);
|
|
||||||
taosTFree(trsupport->localBuffer);
|
taosTFree(trsupport->localBuffer);
|
||||||
taosTFree(trsupport);
|
taosTFree(trsupport);
|
||||||
}
|
}
|
||||||
|
@ -1907,10 +1904,6 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
|
||||||
pParentObj->res.code = pSql->res.code;
|
pParentObj->res.code = pSql->res.code;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(pParentObj->pSubs[pSupporter->index] == tres);
|
|
||||||
|
|
||||||
pParentObj->pSubs[pSupporter->index] = 0;
|
|
||||||
taos_free_result(tres);
|
|
||||||
taosTFree(pSupporter);
|
taosTFree(pSupporter);
|
||||||
|
|
||||||
if (atomic_sub_fetch_32(&pState->numOfRemain, 1) > 0) {
|
if (atomic_sub_fetch_32(&pState->numOfRemain, 1) > 0) {
|
||||||
|
|
|
@ -415,7 +415,7 @@ void tscFreeSqlObj(SSqlObj* pSql) {
|
||||||
|
|
||||||
tscDebug("%p start to free sqlObj", pSql);
|
tscDebug("%p start to free sqlObj", pSql);
|
||||||
|
|
||||||
// tscFreeSubobj(pSql);
|
tscFreeSubobj(pSql);
|
||||||
tscPartiallyFreeSqlObj(pSql);
|
tscPartiallyFreeSqlObj(pSql);
|
||||||
|
|
||||||
pSql->signature = NULL;
|
pSql->signature = NULL;
|
||||||
|
|
|
@ -203,7 +203,7 @@ static void taosGetSystemTimezone() {
|
||||||
snprintf(tsTimezone, TSDB_TIMEZONE_LEN, "%s (%s, %s%02d00)", buf, tzname[daylight], tz >= 0 ? "+" : "-", abs(tz));
|
snprintf(tsTimezone, TSDB_TIMEZONE_LEN, "%s (%s, %s%02d00)", buf, tzname[daylight], tz >= 0 ? "+" : "-", abs(tz));
|
||||||
|
|
||||||
// cfg_timezone->cfgStatus = TAOS_CFG_CSTATUS_DEFAULT;
|
// cfg_timezone->cfgStatus = TAOS_CFG_CSTATUS_DEFAULT;
|
||||||
uInfo("timezone not configured, set to system default:%s", tsTimezone);
|
uWarn("timezone not configured, set to system default:%s", tsTimezone);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -235,7 +235,7 @@ static void taosGetSystemLocale() { // get and set default locale
|
||||||
strcpy(tsLocale, "en_US.UTF-8");
|
strcpy(tsLocale, "en_US.UTF-8");
|
||||||
} else {
|
} else {
|
||||||
tstrncpy(tsLocale, locale, TSDB_LOCALE_LEN);
|
tstrncpy(tsLocale, locale, TSDB_LOCALE_LEN);
|
||||||
uError("locale not configured, set to system default:%s", tsLocale);
|
uWarn("locale not configured, set to system default:%s", tsLocale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -567,29 +567,30 @@ void taosTrashcanEmpty(SCacheObj *pCacheObj, bool force) {
|
||||||
|
|
||||||
if (pCacheObj->numOfElemsInTrash == 0) {
|
if (pCacheObj->numOfElemsInTrash == 0) {
|
||||||
if (pCacheObj->pTrash != NULL) {
|
if (pCacheObj->pTrash != NULL) {
|
||||||
|
pCacheObj->pTrash = NULL;
|
||||||
uError("cache:%s, key:inconsistency data in cache, numOfElem in trashcan:%d", pCacheObj->name, pCacheObj->numOfElemsInTrash);
|
uError("cache:%s, key:inconsistency data in cache, numOfElem in trashcan:%d", pCacheObj->name, pCacheObj->numOfElemsInTrash);
|
||||||
}
|
}
|
||||||
|
|
||||||
pCacheObj->pTrash = NULL;
|
|
||||||
__cache_unlock(pCacheObj);
|
__cache_unlock(pCacheObj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
STrashElem *pElem = pCacheObj->pTrash;
|
const char* stat[] = {"false", "true"};
|
||||||
|
uDebug("cache:%s start to cleanup trashcan, numOfElem in trashcan:%d, free:%s", pCacheObj->name,
|
||||||
|
pCacheObj->numOfElemsInTrash, (force? stat[1]:stat[0]));
|
||||||
|
|
||||||
|
STrashElem *pElem = pCacheObj->pTrash;
|
||||||
while (pElem) {
|
while (pElem) {
|
||||||
T_REF_VAL_CHECK(pElem->pData);
|
T_REF_VAL_CHECK(pElem->pData);
|
||||||
if (pElem->next == pElem) {
|
assert(pElem->next != pElem && pElem->prev != pElem);
|
||||||
pElem->next = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force || (T_REF_VAL_GET(pElem->pData) == 0)) {
|
if (force || (T_REF_VAL_GET(pElem->pData) == 0)) {
|
||||||
uDebug("cache:%s, key:%p, %p removed from trashcan. numOfElem in trashcan:%d", pCacheObj->name, pElem->pData->key, pElem->pData->data,
|
uDebug("cache:%s, key:%p, %p removed from trashcan. numOfElem in trashcan:%d", pCacheObj->name, pElem->pData->key, pElem->pData->data,
|
||||||
pCacheObj->numOfElemsInTrash - 1);
|
pCacheObj->numOfElemsInTrash - 1);
|
||||||
|
|
||||||
STrashElem *p = pElem;
|
doRemoveElemInTrashcan(pCacheObj, pElem);
|
||||||
pElem = doRemoveElemInTrashcan(pCacheObj, p);
|
doDestroyTrashcanElem(pCacheObj, pElem);
|
||||||
doDestroyTrashcanElem(pCacheObj, p);
|
pElem = pCacheObj->pTrash;
|
||||||
} else {
|
} else {
|
||||||
pElem = pElem->next;
|
pElem = pElem->next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue