提交 daf5d423 编写于 作者: H Hongze Cheng

more code

上级 3b9e03ba
...@@ -1439,6 +1439,18 @@ _exit: ...@@ -1439,6 +1439,18 @@ _exit:
return code; return code;
} }
static int32_t tsdbCommitAheadBlock(SCommitter *pCommitter, SBlock *pBlock) {
int32_t code = 0;
// TODO
return code;
}
static int32_t tsdbCommitMergeBlock(SCommitter *pCommitter, SBlock *pBlock) {
int32_t code = 0;
// TODO
return code;
}
static int32_t tsdbMergeTableData(SCommitter *pCommitter, TABLEID id) { static int32_t tsdbMergeTableData(SCommitter *pCommitter, TABLEID id) {
int32_t code = 0; int32_t code = 0;
SBlockIdx *pBlockIdx = pCommitter->dReader.pBlockIdx; SBlockIdx *pBlockIdx = pCommitter->dReader.pBlockIdx;
...@@ -1468,7 +1480,23 @@ static int32_t tsdbMergeTableData(SCommitter *pCommitter, TABLEID id) { ...@@ -1468,7 +1480,23 @@ static int32_t tsdbMergeTableData(SCommitter *pCommitter, TABLEID id) {
pBlock = NULL; pBlock = NULL;
} }
} else if (c > 0) { } else if (c > 0) {
code = tsdbCommitAheadBlock(pCommitter, pBlock);
if (code) goto _err;
pRowInfo = tsdbGetCommitRow(pCommitter);
if (pRowInfo && (pRowInfo->suid != id.suid || pRowInfo->uid != id.uid)) pRowInfo = NULL;
} else { } else {
code = tsdbCommitMergeBlock(pCommitter, pBlock);
if (code) goto _err;
iBlock++;
if (iBlock < pCommitter->dReader.mBlock.nItem) {
tMapDataGetItemByIdx(&pCommitter->dReader.mBlock, iBlock, pBlock, tGetBlock);
} else {
pBlock = NULL;
}
pRowInfo = tsdbGetCommitRow(pCommitter);
if (pRowInfo && (pRowInfo->suid != id.suid || pRowInfo->uid != id.uid)) pRowInfo = NULL;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册