more code

This commit is contained in:
Hongze Cheng 2023-04-04 14:38:17 +08:00
parent 2bab385071
commit 6e6100f254
4 changed files with 17 additions and 10 deletions

View File

@ -327,7 +327,6 @@ _exit:
return code; return code;
} }
#if 0
int32_t tsdbCommitCommit(STsdb *pTsdb) { int32_t tsdbCommitCommit(STsdb *pTsdb) {
int32_t code = 0; int32_t code = 0;
int32_t lino = 0; int32_t lino = 0;
@ -374,4 +373,3 @@ _exit:
} }
return code; return code;
} }
#endif

View File

@ -24,15 +24,22 @@ extern "C" {
/* Exposed Handle */ /* Exposed Handle */
struct SFileSet; struct SFileSet;
struct SSttFileLayer {
int32_t level;
int32_t nFile;
struct STFile *fileList;
};
#define TSDB_STT_FILE_LEVEL_MAX 3
/* Exposed APIs */ /* Exposed APIs */
/* Exposed Structs */ /* Exposed Structs */
struct SFileSet { struct SFileSet {
int32_t fid; int32_t fid;
int64_t nextid; int64_t nextid;
struct STFile *files[TSDB_FTYPE_MAX]; struct STFile *files[TSDB_FTYPE_MAX];
SRBTree fsttTree; struct SSttFileLayer sttLayers[TSDB_STT_FILE_LEVEL_MAX];
}; };
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -30,8 +30,9 @@ typedef enum {
} EFileOpType; } EFileOpType;
struct SFileOp { struct SFileOp {
EFileOpType op; EFileOpType op;
// TODO struct STFile oFile; // old file state
struct STFile nFile; // new file state
}; };
/* Exposed APIs */ /* Exposed APIs */

View File

@ -22,8 +22,9 @@ extern int32_t tsdbReadFile(STsdbFD *pFD, int64_t offset, uint8_t *pBuf, int64_t
extern int32_t tsdbFsyncFile(STsdbFD *pFD); extern int32_t tsdbFsyncFile(STsdbFD *pFD);
typedef struct { typedef struct {
int64_t prevFooter;
SFDataPtr dict[4]; // 0:bloom filter, 1:SSttBlk, 2:STbStatisBlk, 3:SDelBlk SFDataPtr dict[4]; // 0:bloom filter, 1:SSttBlk, 2:STbStatisBlk, 3:SDelBlk
uint8_t reserved[32]; uint8_t reserved[24];
} SFSttFooter; } SFSttFooter;
struct SSttFWriter { struct SSttFWriter {