提交 32f7a272 编写于 作者: H Hongze Cheng

TD-353

上级 2e3ae87f
...@@ -67,13 +67,13 @@ int tsdbOpenBufPool(STsdbRepo *pRepo) { ...@@ -67,13 +67,13 @@ int tsdbOpenBufPool(STsdbRepo *pRepo) {
ASSERT(pPool != NULL); ASSERT(pPool != NULL);
pPool->bufBlockSize = pCfg->cacheBlockSize; pPool->bufBlockSize = pCfg->cacheBlockSize * 1024 * 1024;
pPool->tBufBlocks = pCfg->totalBlocks; pPool->tBufBlocks = pCfg->totalBlocks;
pPool->nBufBlocks = 0; pPool->nBufBlocks = 0;
pPool->index = 0; pPool->index = 0;
for (int i = 0; i < pCfg->totalBlocks; i++) { for (int i = 0; i < pCfg->totalBlocks; i++) {
STsdbBufBlock *pBufBlock = tsdbNewBufBlock(pCfg->cacheBlockSize); STsdbBufBlock *pBufBlock = tsdbNewBufBlock(pPool->bufBlockSize);
if (pBufBlock == NULL) goto _err; if (pBufBlock == NULL) goto _err;
if (tdListAppend(pPool->bufBlockList, (void *)(&pBufBlock)) < 0) { if (tdListAppend(pPool->bufBlockList, (void *)(&pBufBlock)) < 0) {
......
...@@ -98,7 +98,7 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) { ...@@ -98,7 +98,7 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) {
ASSERT(POINTER_DISTANCE(pBuf, buf) == tlen1); ASSERT(POINTER_DISTANCE(pBuf, buf) == tlen1);
buf = pBuf; buf = pBuf;
} }
tsdbInsertTableAct(pRepo, TSDB_UPDATE_META, buf, super); tsdbInsertTableAct(pRepo, TSDB_UPDATE_META, buf, table);
return 0; return 0;
...@@ -722,7 +722,7 @@ static int tsdbAddTableToMeta(STsdbRepo *pRepo, STable *pTable, bool addIdx) { ...@@ -722,7 +722,7 @@ static int tsdbAddTableToMeta(STsdbRepo *pRepo, STable *pTable, bool addIdx) {
goto _err; goto _err;
} }
} else { } else {
if (TABLE_TID(pTable) == TSDB_CHILD_TABLE && addIdx) { // add STABLE to the index if (TABLE_TYPE(pTable) == TSDB_CHILD_TABLE && addIdx) { // add STABLE to the index
if (tsdbAddTableIntoIndex(pMeta, pTable) < 0) { if (tsdbAddTableIntoIndex(pMeta, pTable) < 0) {
tsdbTrace("vgId:%d failed to add table %s to meta while add table to index since %s", REPO_ID(pRepo), tsdbTrace("vgId:%d failed to add table %s to meta while add table to index since %s", REPO_ID(pRepo),
TABLE_CHAR_NAME(pTable), tstrerror(terrno)); TABLE_CHAR_NAME(pTable), tstrerror(terrno));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册