提交 8582e0c7 编写于 作者: H Hongze Cheng

fix: important fix for compact file corruption

上级 df6c93fd
...@@ -86,7 +86,7 @@ static int32_t tsdbSttLvlApplyEdit(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl *l ...@@ -86,7 +86,7 @@ static int32_t tsdbSttLvlApplyEdit(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl *l
// create a file obj // create a file obj
code = tsdbTFileObjInit(pTsdb, fobj1->f, &fobj2); code = tsdbTFileObjInit(pTsdb, fobj1->f, &fobj2);
if (code) return code; if (code) return code;
code = TARRAY2_APPEND(lvl2->fobjArr, fobj2); code = TARRAY2_INSERT_PTR(lvl2->fobjArr, i2, &fobj2);
if (code) return code; if (code) return code;
i1++; i1++;
i2++; i2++;
...@@ -112,7 +112,7 @@ static int32_t tsdbSttLvlApplyEdit(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl *l ...@@ -112,7 +112,7 @@ static int32_t tsdbSttLvlApplyEdit(STsdb *pTsdb, const SSttLvl *lvl1, SSttLvl *l
// create a file obj // create a file obj
code = tsdbTFileObjInit(pTsdb, fobj1->f, &fobj2); code = tsdbTFileObjInit(pTsdb, fobj1->f, &fobj2);
if (code) return code; if (code) return code;
code = TARRAY2_APPEND(lvl2->fobjArr, fobj2); code = TARRAY2_INSERT_PTR(lvl2->fobjArr, i2, &fobj2);
if (code) return code; if (code) return code;
i1++; i1++;
i2++; i2++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册