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

more code

上级 68f07c4b
......@@ -59,7 +59,7 @@ typedef struct SSttLvl {
struct STFileSet {
int32_t fid;
STFile *farr[TSDB_FTYPE_MAX]; // file array
STFileObj *farr[TSDB_FTYPE_MAX]; // file array
SRBTree lvlTree; // level tree of .stt
};
......
......@@ -23,6 +23,7 @@ extern "C" {
#endif
typedef struct STFile STFile;
typedef struct STFileObj STFileObj;
typedef enum {
TSDB_FTYPE_HEAD = 0, // .head
......
......@@ -50,7 +50,7 @@ static int32_t add_file(STFileSet *fset, STFile *f) {
// lvl->nstt++;
// lvl->fstt = f;
} else {
fset->farr[f->type] = f;
// fset->farr[f->type] = f;
}
return 0;
......@@ -69,8 +69,8 @@ int32_t tsdbFileSetToJson(const STFileSet *fset, cJSON *json) {
continue;
}
code = tsdbTFileToJson(fset->farr[ftype], json);
if (code) return code;
// code = tsdbTFileToJson(fset->farr[ftype], json);
// if (code) return code;
}
// each level
......@@ -103,8 +103,8 @@ int32_t tsdbFileSetFromJson(const cJSON *json, STFileSet *fset) {
}
for (int32_t ftype = TSDB_FTYPE_MIN; ftype < TSDB_FTYPE_MAX; ++ftype) {
int32_t code = tsdbTFileFromJson(json, ftype, &fset->farr[ftype]);
if (code) return code;
// int32_t code = tsdbTFileFromJson(json, ftype, &fset->farr[ftype]->f);
// if (code) return code;
}
// each level
......@@ -131,11 +131,11 @@ int32_t tsdbFSetEdit(STFileSet *fset, const STFileOp *op) {
if (op->oState.size == 0) {
// create
STFile *f;
code = tsdbTFileCreate(&op->nState, &f);
if (code) return code;
// STFile *f;
// code = tsdbTFileCreate(&op->nState, &f);
// if (code) return code;
add_file(fset, f);
// add_file(fset, f);
} else if (op->nState.size == 0) {
// delete
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册