fix: catalog dbg issue
This commit is contained in:
parent
383a0b5dd5
commit
59b10f414c
|
@ -1987,11 +1987,13 @@ void catalogDestroy(void) {
|
||||||
|
|
||||||
if (gCtgMgmt.cacheTimer) {
|
if (gCtgMgmt.cacheTimer) {
|
||||||
if (!taosTmrStop(gCtgMgmt.cacheTimer)) {
|
if (!taosTmrStop(gCtgMgmt.cacheTimer)) {
|
||||||
|
/*
|
||||||
qDebug("catalog cacheTimer %" PRIuPTR " not stopped", (uintptr_t)gCtgMgmt.cacheTimer);
|
qDebug("catalog cacheTimer %" PRIuPTR " not stopped", (uintptr_t)gCtgMgmt.cacheTimer);
|
||||||
|
|
||||||
while (!taosTmrIsStopped(&gCtgMgmt.cacheTimer)) {
|
while (!taosTmrIsStopped(&gCtgMgmt.cacheTimer)) {
|
||||||
taosMsleep(1);
|
taosMsleep(1);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug("catalog cacheTimer %" PRIuPTR " is stopped", (uintptr_t)gCtgMgmt.cacheTimer);
|
qDebug("catalog cacheTimer %" PRIuPTR " is stopped", (uintptr_t)gCtgMgmt.cacheTimer);
|
||||||
|
|
|
@ -480,6 +480,8 @@ void ctgdShowDBCache(SCatalog *pCtg, SHashObj *dbHash) {
|
||||||
|
|
||||||
dbCache = (SCtgDBCache *)pIter;
|
dbCache = (SCtgDBCache *)pIter;
|
||||||
|
|
||||||
|
CTG_LOCK(CTG_READ, &dbCache->dbLock);
|
||||||
|
|
||||||
dbFName = taosHashGetKey(pIter, &len);
|
dbFName = taosHashGetKey(pIter, &len);
|
||||||
|
|
||||||
int32_t metaNum = dbCache->tbCache ? taosHashGetSize(dbCache->tbCache) : 0;
|
int32_t metaNum = dbCache->tbCache ? taosHashGetSize(dbCache->tbCache) : 0;
|
||||||
|
@ -509,6 +511,8 @@ void ctgdShowDBCache(SCatalog *pCtg, SHashObj *dbHash) {
|
||||||
hashMethod, hashPrefix, hashSuffix, vgNum);
|
hashMethod, hashPrefix, hashSuffix, vgNum);
|
||||||
|
|
||||||
if (dbCache->vgCache.vgInfo) {
|
if (dbCache->vgCache.vgInfo) {
|
||||||
|
CTG_LOCK(CTG_READ, &dbCache->vgCache.vgLock);
|
||||||
|
|
||||||
int32_t i = 0;
|
int32_t i = 0;
|
||||||
void *pVgIter = taosHashIterate(dbCache->vgCache.vgInfo->vgHash, NULL);
|
void *pVgIter = taosHashIterate(dbCache->vgCache.vgInfo->vgHash, NULL);
|
||||||
while (pVgIter) {
|
while (pVgIter) {
|
||||||
|
@ -524,6 +528,8 @@ void ctgdShowDBCache(SCatalog *pCtg, SHashObj *dbHash) {
|
||||||
|
|
||||||
pVgIter = taosHashIterate(dbCache->vgCache.vgInfo->vgHash, pVgIter);
|
pVgIter = taosHashIterate(dbCache->vgCache.vgInfo->vgHash, pVgIter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CTG_UNLOCK(CTG_READ, &dbCache->vgCache.vgLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbCache->cfgCache.cfgInfo) {
|
if (dbCache->cfgCache.cfgInfo) {
|
||||||
|
@ -544,6 +550,8 @@ void ctgdShowDBCache(SCatalog *pCtg, SHashObj *dbHash) {
|
||||||
pCfg->schemaless, pCfg->sstTrigger);
|
pCfg->schemaless, pCfg->sstTrigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CTG_UNLOCK(CTG_READ, &dbCache->dbLock);
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
pIter = taosHashIterate(dbHash, pIter);
|
pIter = taosHashIterate(dbHash, pIter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue