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

more

上级 f7c77172
...@@ -518,6 +518,12 @@ struct SRowMerger { ...@@ -518,6 +518,12 @@ struct SRowMerger {
SArray *pArray; // SArray<SColVal> SArray *pArray; // SArray<SColVal>
}; };
struct STsdbFSState {
SDelFile *pDelFile;
SArray *aDFileSet; // SArray<aDFileSet>
SDelFile delFile;
};
struct STsdbFS { struct STsdbFS {
STsdb *pTsdb; STsdb *pTsdb;
TdThreadRwlock lock; TdThreadRwlock lock;
......
...@@ -735,6 +735,9 @@ static int32_t tsdbCommitMemoryData(SCommitter *pCommitter, STbData *pTbData) { ...@@ -735,6 +735,9 @@ static int32_t tsdbCommitMemoryData(SCommitter *pCommitter, STbData *pTbData) {
code = tBlockDataAppendRow(pBlockData, pRow, NULL); code = tBlockDataAppendRow(pBlockData, pRow, NULL);
if (code) goto _err; if (code) goto _err;
pBlock->minVersion = TMIN(pBlock->minVersion, tsdbRowKey(pRow).version);
pBlock->maxVersion = TMAX(pBlock->maxVersion, tsdbRowKey(pRow).version);
tsdbTbDataIterNext(pIter); tsdbTbDataIterNext(pIter);
pRow = tsdbTbDataIterGet(pIter); pRow = tsdbTbDataIterGet(pIter);
...@@ -743,6 +746,10 @@ static int32_t tsdbCommitMemoryData(SCommitter *pCommitter, STbData *pTbData) { ...@@ -743,6 +746,10 @@ static int32_t tsdbCommitMemoryData(SCommitter *pCommitter, STbData *pTbData) {
} }
} }
if (pBlockData->nRow > 0) {
// write the block to file
}
_exit: _exit:
if (pRow) { if (pRow) {
pCommitter->nextKey = TMIN(pCommitter->nextKey, tsdbRowKey(pRow).ts); pCommitter->nextKey = TMIN(pCommitter->nextKey, tsdbRowKey(pRow).ts);
......
...@@ -15,12 +15,6 @@ ...@@ -15,12 +15,6 @@
#include "tsdb.h" #include "tsdb.h"
struct STsdbFSState {
SDelFile *pDelFile;
SArray *aDFileSet; // SArray<aDFileSet>
SDelFile delFile;
};
// ================================================================================================= // =================================================================================================
static int32_t tsdbDelFileToJson(const void *pObj, SJson *pJson) { static int32_t tsdbDelFileToJson(const void *pObj, SJson *pJson) {
int32_t code = 0; int32_t code = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册