more
This commit is contained in:
parent
c56ab19553
commit
02837954d0
|
@ -47,12 +47,12 @@ struct STsdb {
|
|||
STsdbMemTable * imem;
|
||||
SRtn rtn;
|
||||
SMemAllocatorFactory *pmaf;
|
||||
STsdbFS fs;
|
||||
STsdbFS * fs;
|
||||
};
|
||||
|
||||
#define REPO_ID(r) 0
|
||||
#define REPO_CFG(r) (&(r)->config)
|
||||
#define REPO_FS(r) (&(r)->fs)
|
||||
#define REPO_FS(r) (r)->fs
|
||||
|
||||
static FORCE_INLINE STSchema *tsdbGetTableSchemaImpl(STable *pTable, bool lock, bool copy, int32_t version) {
|
||||
return pTable->pSchema;
|
||||
|
|
|
@ -1287,7 +1287,7 @@ static int tsdbRestoreCurrent(STsdb *pRepo) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (tsdbSaveFSStatus(pRepo->fs.cstatus, REPO_ID(pRepo)) < 0) {
|
||||
if (tsdbSaveFSStatus(pRepo->fs->cstatus, REPO_ID(pRepo)) < 0) {
|
||||
tsdbError("vgId:%d failed to restore corrent since %s", REPO_ID(pRepo), tstrerror(terrno));
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -75,22 +75,27 @@ static STsdb *tsdbNew(const char *path, const STsdbCfg *pTsdbCfg, SMemAllocatorF
|
|||
tsdbOptionsCopy(&(pTsdb->config), pTsdbCfg);
|
||||
pTsdb->pmaf = pMAF;
|
||||
|
||||
pTsdb->fs = tsdbNewFS(pTsdbCfg);
|
||||
|
||||
return pTsdb;
|
||||
}
|
||||
|
||||
static void tsdbFree(STsdb *pTsdb) {
|
||||
if (pTsdb) {
|
||||
tsdbFreeFS(pTsdb->fs);
|
||||
tfree(pTsdb->path);
|
||||
free(pTsdb);
|
||||
}
|
||||
}
|
||||
|
||||
static int tsdbOpenImpl(STsdb *pTsdb) {
|
||||
tsdbOpenFS(pTsdb);
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tsdbCloseImpl(STsdb *pTsdb) {
|
||||
tsdbCloseFS(pTsdb);
|
||||
// TODO
|
||||
}
|
||||
#if 0
|
||||
|
@ -112,8 +117,8 @@ static void tsdbCloseImpl(STsdb *pTsdb) {
|
|||
// no test file errors here
|
||||
#include "taosdef.h"
|
||||
#include "tsdbint.h"
|
||||
#include "ttimer.h"
|
||||
#include "tthread.h"
|
||||
#include "ttimer.h"
|
||||
|
||||
#define IS_VALID_PRECISION(precision) \
|
||||
(((precision) >= TSDB_TIME_PRECISION_MILLI) && ((precision) <= TSDB_TIME_PRECISION_NANO))
|
||||
|
|
Loading…
Reference in New Issue