diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index a0841fa2344682facb4a6dc8666716e38a31ea1d..b65e59b0286173adde087f484af27253152b3b96 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -207,6 +207,7 @@ void tscProcessActivityTimer(void *handle, void *tmrId) { assert(*pHB->self == pHB); + pHB->retry = 0; // reset retry counter int32_t code = tscProcessSql(pHB); taosCacheRelease(tscObjCache, (void**) &p, false); diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 6e20c1708dfc81728c6b961b9259d50e953b4b9d..bc795a7434aec5f5ebb6cfcd71a0a1469adcafb8 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -335,7 +335,7 @@ void *taosCacheTransfer(SCacheObj *pCacheObj, void **data) { } void taosCacheRelease(SCacheObj *pCacheObj, void **data, bool _remove) { - if (pCacheObj == NULL || taosHashGetSize(pCacheObj->pHashTable) + pCacheObj->numOfElemsInTrash == 0) { + if (pCacheObj == NULL) { return; }