more
This commit is contained in:
parent
f7c771727a
commit
a7ea0bfe73
|
@ -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) {
|
||||||
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) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 @@
|
||||||
|
|
||||||
#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;
|
||||||
|
|
Loading…
Reference in New Issue