提交 671f613c 编写于 作者: H Hongze Cheng

feat: tsdb multi-version

上级 6f10b88f
......@@ -857,8 +857,8 @@ static FORCE_INLINE int tsdbUnLockFS(STsdbFS *pFs) {
}
struct TSDBROW {
int64_t version;
STSRow2 *pRow;
int64_t version;
STSRow2 tsRow;
};
struct TSDBKEY {
......
......@@ -81,6 +81,7 @@ int32_t tsdbInsertTableData2(STsdb *pTsdb, int64_t version, SVSubmitBlk *pSubmit
int32_t code = 0;
SMemTable *pMemTable = (SMemTable *)pTsdb->mem; // TODO
SMemData *pMemData;
TSDBROW row = {.version = version};
ASSERT(pMemTable);
......@@ -95,6 +96,15 @@ int32_t tsdbInsertTableData2(STsdb *pTsdb, int64_t version, SVSubmitBlk *pSubmit
}
// do insert
uint32_t n = 0;
uint8_t *p = pSubmitBlk->pData;
while (n < pSubmitBlk->nData) {
n += tGetTSRow(p + n, &row.tsRow);
ASSERT(n <= pSubmitBlk->nData);
// TODO
}
return code;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册