diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index aaa1d5ba9ea5eff91ce2853f6bb29a9204a66e1c..8d538e37bc6e3a35b05703de485189c703f3c0d7 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -720,8 +720,6 @@ void* taosCacheTimedRefresh(void *handle) { continue; } - pthread_mutex_unlock(&guard); - if ((count % pCacheObj->checkTick) != 0) { continue; } @@ -741,6 +739,8 @@ void* taosCacheTimedRefresh(void *handle) { } taosTrashcanEmpty(pCacheObj, false); + + pthread_mutex_unlock(&guard); } }