“175811008723222f9d19dde242a8f40486b5a89e”上不存在“source/dnode/vnode/tsdb/inc/tsdbFile.h”
提交 0e7a420e 编写于 作者: H Hongze Cheng

fix another bug

上级 6b0b988f
...@@ -482,6 +482,13 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) { ...@@ -482,6 +482,13 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) {
ASSERT(0); ASSERT(0);
return -1; return -1;
} }
ret = tdbPagerWrite(pBt->pPager, pOlds[i]);
if (ret < 0) {
// TODO
ASSERT(0);
return -1;
}
} }
// copy the parent key out if child pages are not leaf page // copy the parent key out if child pages are not leaf page
childNotLeaf = !TDB_BTREE_PAGE_IS_LEAF(pOlds[0]); childNotLeaf = !TDB_BTREE_PAGE_IS_LEAF(pOlds[0]);
...@@ -495,13 +502,6 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) { ...@@ -495,13 +502,6 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) {
} }
if (i < nOlds - 1) { if (i < nOlds - 1) {
ret = tdbPagerWrite(pBt->pPager, pOlds[i]);
if (ret < 0) {
// TODO
ASSERT(0);
return -1;
}
((SPgno *)pDivCell[i])[0] = ((SIntHdr *)pOlds[i]->pData)->pgno; ((SPgno *)pDivCell[i])[0] = ((SIntHdr *)pOlds[i]->pData)->pgno;
((SIntHdr *)pOlds[i]->pData)->pgno = 0; ((SIntHdr *)pOlds[i]->pData)->pgno = 0;
tdbPageInsertCell(pOlds[i], TDB_PAGE_TOTAL_CELLS(pOlds[i]), pDivCell[i], szDivCell[i], 1); tdbPageInsertCell(pOlds[i], TDB_PAGE_TOTAL_CELLS(pOlds[i]), pDivCell[i], szDivCell[i], 1);
......
...@@ -214,6 +214,7 @@ int tdbPagerCommit(SPager *pPager) { ...@@ -214,6 +214,7 @@ int tdbPagerCommit(SPager *pPager) {
tdbOsClose(pPager->jfd); tdbOsClose(pPager->jfd);
tdbOsRemove(pPager->jFileName); tdbOsRemove(pPager->jFileName);
pPager->dbOrigSize = pPager->dbFileSize; pPager->dbOrigSize = pPager->dbFileSize;
pPager->inTran = 0;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册