diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index b459beb658..2b376bbce8 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -1284,7 +1284,9 @@ void catalogDestroy(void) { atomic_store_8((int8_t*)&gCtgMgmt.exit, true); - ctgClearCacheEnqueue(NULL, true, true, true); + if (!taosCheckCurrentInDll()) { + ctgClearCacheEnqueue(NULL, true, true, true); + } taosHashCleanup(gCtgMgmt.pCluster); gCtgMgmt.pCluster = NULL;