diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 26c2d97fe9bc9e573f16fc45313c68028b94f16f..be5584d182392cd622fc923becec311680affc21 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -721,8 +721,6 @@ void* taosCacheTimedRefresh(void *handle) { continue; } - pthread_mutex_unlock(&guard); - if ((count % pCacheObj->checkTick) != 0) { continue; } @@ -742,6 +740,8 @@ void* taosCacheTimedRefresh(void *handle) { } taosTrashcanEmpty(pCacheObj, false); + + pthread_mutex_unlock(&guard); } }