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

more code

上级 2a754394
......@@ -37,8 +37,7 @@ int32_t tsdbFileSetToJson(const STFileSet *fset, cJSON *json);
int32_t tsdbFileSetFromJson(const cJSON *json, STFileSet *fset);
int32_t tsdbFileSetCreate(int32_t fid, STFileSet **ppSet);
int32_t tsdbFileSetEdit(STFileSet *pSet, STFileOp *pOp);
int32_t tsdbEditFileSet(STFileSet *pFileSet, const STFileOp *pOp);
int32_t tsdbFSetEdit(STFileSet *pSet, const STFileOp *pOp);
int32_t tsdbFSetCmprFn(const STFileSet *pSet1, const STFileSet *pSet2);
......
......@@ -433,7 +433,7 @@ static int32_t fset_cmpr_fn(const struct STFileSet *pSet1, const struct STFileSe
static int32_t edit_fs(STFileSystem *pFS, const SArray *aFileOp) {
int32_t code = 0;
int32_t lino;
int32_t lino = 0;
STFileSet *pSet = NULL;
for (int32_t iop = 0; iop < taosArrayGetSize(aFileOp); iop++) {
......@@ -444,7 +444,13 @@ static int32_t edit_fs(STFileSystem *pFS, const SArray *aFileOp) {
pSet = taosArraySearch(pFS->nstate, &fset, (__compar_fn_t)tsdbFSetCmprFn, TD_EQ);
}
// TODO
if (pSet == NULL) {
ASSERT(op->oState.size == 0 && op->nState.size > 0);
// TODO
}
code = tsdbFSetEdit(pSet, op);
TSDB_CHECK_CODE(code, lino, _exit)
}
_exit:
......
......@@ -58,12 +58,6 @@ _exit:
return code;
}
int32_t tsdbFileSetEdit(struct STFileSet *pSet, struct STFileOp *pOp) {
int32_t code = 0;
// TODO
return code;
}
int32_t tsdbFileSetToJson(const STFileSet *fset, cJSON *json) {
int32_t code = 0;
......@@ -126,15 +120,13 @@ int32_t tsdbFileSetFromJson(const cJSON *json, STFileSet *fset) {
return 0;
}
int32_t tsdbEditFileSet(struct STFileSet *pFileSet, const struct STFileOp *pOp) {
int32_t code = 0;
ASSERTS(0, "TODO: Not implemented yet");
// TODO
return code;
}
int32_t tsdbFSetCmprFn(const STFileSet *pSet1, const STFileSet *pSet2) {
if (pSet1->fid < pSet2->fid) return -1;
if (pSet1->fid > pSet2->fid) return 1;
return 0;
}
int32_t tsdbFSetEdit(STFileSet *pSet, const STFileOp *pOp) {
// TODO
return 0;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册