more code

This commit is contained in:
Hongze Cheng 2022-08-23 10:59:30 +08:00
parent 1a265d8eca
commit d65956d1a3
4 changed files with 58 additions and 3 deletions

View File

@ -51,6 +51,8 @@ target_sources(
"src/tsdb/tsdbRetention.c"
"src/tsdb/tsdbDiskData.c"
"src/tsdb/tsdbCompress.c"
"src/tsdb/tsdbMerge.c"
"src/tsdb/tsdbCompact.c"
# tq
"src/tq/tq.c"

View File

@ -35,8 +35,8 @@ typedef struct {
int32_t minRow;
int32_t maxRow;
int8_t cmprAlg;
SArray *aTbDataP;
STsdbFS fs;
SArray *aTbDataP; // memory
STsdbFS fs; // disk
// --------------
TSKEY nextKey; // reset by each table commit
int32_t commitFid;
@ -1278,7 +1278,6 @@ static int32_t tsdbStartCommit(STsdb *pTsdb, SCommitter *pCommitter) {
code = TSDB_CODE_OUT_OF_MEMORY;
goto _err;
}
code = tsdbFSCopy(pTsdb, &pCommitter->fs);
if (code) goto _err;

View File

@ -0,0 +1,27 @@
/*
* 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 "tsdb.h"
typedef struct {
STsdb *pTsdb;
STsdbFS fs;
} STsdbCompactor;
int32_t tsdbCompact(STsdb *pTsdb) {
int32_t code = 0;
// TODO
return code;
}

View File

@ -0,0 +1,27 @@
/*
* 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 "tsdb.h"
typedef struct {
STsdb *pTsdb;
STsdbFS fs;
} STsdbMerger;
int32_t tsdbMerge(STsdb *pTsdb) {
int32_t code = 0;
// TODO
return code;
}