From 4e77ffd28369499bd21110507c7b1580404cdec5 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 11 Jun 2020 11:16:09 +0800 Subject: [PATCH] TD-353 --- src/inc/tsdb.h | 2 +- src/tsdb/src/tsdbMain.c | 4 ++-- src/vnode/src/vnodeMain.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inc/tsdb.h b/src/inc/tsdb.h index 6f2e48f801..96a04ea5ed 100644 --- a/src/inc/tsdb.h +++ b/src/inc/tsdb.h @@ -77,7 +77,7 @@ typedef void TSDB_REPO_T; // use void to hide implementation details from outsi STsdbCfg *tsdbGetCfg(const TSDB_REPO_T *repo); // --------- TSDB REPOSITORY DEFINITION -int tsdbCreateRepo(char *rootDir, STsdbCfg *pCfg, void *limiter); +int tsdbCreateRepo(char *rootDir, STsdbCfg *pCfg); int32_t tsdbDropRepo(TSDB_REPO_T *repo); TSDB_REPO_T *tsdbOpenRepo(char *rootDir, STsdbAppH *pAppH); int32_t tsdbCloseRepo(TSDB_REPO_T *repo, int toCommit); diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 0be07d6179..e2af459ae3 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -91,7 +91,7 @@ STsdbCfg *tsdbGetCfg(const TSDB_REPO_T *repo) { * * @return a TSDB repository handle on success, NULL for failure */ -int32_t tsdbCreateRepo(char *rootDir, STsdbCfg *pCfg, void *limiter /* TODO */) { +int32_t tsdbCreateRepo(char *rootDir, STsdbCfg *pCfg) { if (mkdir(rootDir, 0755) != 0) { tsdbError("vgId:%d, failed to create rootDir! rootDir:%s, reason:%s", pCfg->tsdbId, rootDir, strerror(errno)); if (errno == EACCES) { @@ -117,7 +117,7 @@ int32_t tsdbCreateRepo(char *rootDir, STsdbCfg *pCfg, void *limiter /* TODO */) pRepo->rootDir = strdup(rootDir); pRepo->config = *pCfg; - pRepo->limiter = limiter; + // pRepo->limiter = limiter; // Create the environment files and directories int32_t code = tsdbSetRepoEnv(pRepo); diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index b952c07616..cbebbfd4e2 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -123,7 +123,7 @@ int32_t vnodeCreate(SMDCreateVnodeMsg *pVnodeCfg) { char tsdbDir[TSDB_FILENAME_LEN] = {0}; sprintf(tsdbDir, "%s/vnode%d/tsdb", tsVnodeDir, pVnodeCfg->cfg.vgId); - code = tsdbCreateRepo(tsdbDir, &tsdbCfg, NULL); + code = tsdbCreateRepo(tsdbDir, &tsdbCfg); if (code != TSDB_CODE_SUCCESS) { vError("vgId:%d, failed to create tsdb in vnode, reason:%s", pVnodeCfg->cfg.vgId, tstrerror(code)); return TSDB_CODE_VND_INIT_FAILED;