fix: use stable stats cache to get ctbNum
This commit is contained in:
parent
25b279dd7a
commit
de113ccf5f
|
@ -362,6 +362,8 @@ int metaAlterSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) {
|
|||
// update uid index
|
||||
metaUpdateUidIdx(pMeta, &nStbEntry);
|
||||
|
||||
metaStatsCacheDrop(pMeta, nStbEntry.uid);
|
||||
|
||||
metaULock(pMeta);
|
||||
|
||||
if (oStbEntry.pBuf) taosMemoryFree(oStbEntry.pBuf);
|
||||
|
@ -615,6 +617,7 @@ static int metaDropTableByUid(SMeta *pMeta, tb_uid_t uid, int *type) {
|
|||
tdbTbDelete(pMeta->pSuidIdx, &e.uid, sizeof(tb_uid_t), &pMeta->txn);
|
||||
// drop schema.db (todo)
|
||||
|
||||
metaStatsCacheDrop(pMeta, uid);
|
||||
--pMeta->pVnode->config.vndStats.numOfSTables;
|
||||
}
|
||||
|
||||
|
|
|
@ -495,8 +495,11 @@ int32_t vnodeGetTimeSeriesNum(SVnode *pVnode, int64_t *num) {
|
|||
break;
|
||||
}
|
||||
|
||||
int64_t ctbNum = 0;
|
||||
vnodeGetCtbNum(pVnode, id, &ctbNum);
|
||||
SMetaStbStats stats = {0};
|
||||
metaGetStbStats(pVnode->pMeta, id, &stats);
|
||||
int64_t ctbNum = stats.ctbNum;
|
||||
// vnodeGetCtbNum(pVnode, id, &ctbNum);
|
||||
|
||||
int numOfCols = 0;
|
||||
vnodeGetStbColumnNum(pVnode, id, &numOfCols);
|
||||
|
||||
|
|
Loading…
Reference in New Issue