more code
This commit is contained in:
parent
3b9e03ba17
commit
daf5d42394
|
@ -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) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue