diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 26c2d97fe9..be5584d182 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); } }