提交 2bab3850 编写于 作者: H Hongze Cheng

more code

上级 7e48fc3c
......@@ -26,6 +26,8 @@ extern "C" {
#include "tsdbFile.h"
#include "tsdbFileOp.h"
#include "tsdbFS.h"
#include "tsdbSttFWriter.h"
......
......@@ -33,6 +33,7 @@ typedef struct {
TSKEY minKey;
TSKEY maxKey;
// writer
SArray *aFileOp;
struct SSttFWriter *pWriter;
} SCommitter;
......@@ -358,7 +359,7 @@ _exit:
return code;
}
int32_t tsdbCommitRollback(STsdb *pTsdb) {
int32_t tsdbCommitAbort(STsdb *pTsdb) {
int32_t code = 0;
int32_t lino = 0;
......
......@@ -15,15 +15,6 @@
#include "dev.h"
typedef enum {
TSDB_FOP_CREATE = -2, // create a file
TSDB_FOP_EXTEND, // extend a file
TSDB_FOP_NONE, // no operation
TSDB_FOP_TRUNCATE, // truncate a file
TSDB_FOP_DELETE, // delete a file
TSDB_FOP_MAX,
} tsdb_fop_t;
const char *tsdb_ftype_suffix[] = {
".head", // TSDB_FTYPE_HEAD
".data", // TSDB_FTYPE_DATA
......@@ -33,14 +24,6 @@ const char *tsdb_ftype_suffix[] = {
".stt",
};
struct SFileOp {
tsdb_fop_t op;
union {
struct {
} create;
};
};
int32_t tsdbTFileInit(STsdb *pTsdb, struct STFile *pFile) {
SVnode *pVnode = pTsdb->pVnode;
STfs *pTfs = pVnode->pTfs;
......
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TSDB_FILE_OP_H
#define _TSDB_FILE_OP_H
#ifdef __cplusplus
extern "C" {
#endif
/* Exposed Handle */
typedef enum {
TSDB_FOP_EXTEND = -2,
TSDB_FOP_CREATE,
TSDB_FOP_NONE,
TSDB_FOP_DELETE,
TSDB_FOP_TRUNCATE,
} EFileOpType;
struct SFileOp {
EFileOpType op;
// TODO
};
/* Exposed APIs */
/* Exposed Structs */
#ifdef __cplusplus
}
#endif
#endif /*_TSDB_FILE_OP_H*/
\ No newline at end of file
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dev.h"
typedef struct {
STsdb *pTsdb;
} SMerger;
int32_t tsdbMergeBegin(STsdb *pTsdb) {
int32_t code = 0;
// TODO
return code;
}
int32_t tsdbMergeCommit(STsdb *pTsdb) {
int32_t code = 0;
// TODO
return code;
}
int32_t tsdbMergeAbort(STsdb *pTsdb) {
int32_t code = 0;
// TODO
return code;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册