diff --git a/source/dnode/vnode/src/tsdb/dev/inc/tsdbFSet.h b/source/dnode/vnode/src/tsdb/dev/inc/tsdbFSet.h index 40c3de2e1d7f90394a76fda5e5f1f1bd7eb6bf62..f32691ac6dd13e99f4d047eeff0f57cf75ea985e 100644 --- a/source/dnode/vnode/src/tsdb/dev/inc/tsdbFSet.h +++ b/source/dnode/vnode/src/tsdb/dev/inc/tsdbFSet.h @@ -58,9 +58,9 @@ typedef struct SSttLvl { } SSttLvl; struct STFileSet { - int32_t fid; - STFile *farr[TSDB_FTYPE_MAX]; // file array - SRBTree lvlTree; // level tree of .stt + int32_t fid; + STFileObj *farr[TSDB_FTYPE_MAX]; // file array + SRBTree lvlTree; // level tree of .stt }; #ifdef __cplusplus diff --git a/source/dnode/vnode/src/tsdb/dev/inc/tsdbFile.h b/source/dnode/vnode/src/tsdb/dev/inc/tsdbFile.h index 64b7b0b2aebde93a0618c5e602905d750864b03c..7fa35309a0ca0b10c068c0e565c1c8f21666f2a0 100644 --- a/source/dnode/vnode/src/tsdb/dev/inc/tsdbFile.h +++ b/source/dnode/vnode/src/tsdb/dev/inc/tsdbFile.h @@ -22,7 +22,8 @@ extern "C" { #endif -typedef struct STFile STFile; +typedef struct STFile STFile; +typedef struct STFileObj STFileObj; typedef enum { TSDB_FTYPE_HEAD = 0, // .head diff --git a/source/dnode/vnode/src/tsdb/dev/tsdbFSet.c b/source/dnode/vnode/src/tsdb/dev/tsdbFSet.c index fb904072b035e5e851f65c37b9953292086c8b8d..ac3d8fafc368d6290dd30fd6ac39be506d7fc003 100644 --- a/source/dnode/vnode/src/tsdb/dev/tsdbFSet.c +++ b/source/dnode/vnode/src/tsdb/dev/tsdbFSet.c @@ -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 {