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

fix some bug

上级 cdd74abd
......@@ -22,35 +22,35 @@
extern "C" {
#endif
static FORCE_INLINE void tdGetMnodeRootDir(char *baseDir, char *dirName) {
static FORCE_INLINE void tdGetMnodeRootDir(const char *baseDir, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/mnode", baseDir);
}
static FORCE_INLINE void tdGetDnodeRootDir(char *baseDir, char *dirName) {
static FORCE_INLINE void tdGetDnodeRootDir(const char *baseDir, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/dnode", baseDir);
}
static FORCE_INLINE void tdGetVnodeRootDir(char *baseDir, char *dirName) {
static FORCE_INLINE void tdGetVnodeRootDir(const char *baseDir, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/vnode", baseDir);
}
static FORCE_INLINE void tdGetVnodeBackRootDir(char *baseDir, char *dirName) {
static FORCE_INLINE void tdGetVnodeBackRootDir(const char *baseDir, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/vnode_bak", baseDir);
}
static FORCE_INLINE void tdGetVnodeDir(char *baseDir, int vid, char *dirName) {
static FORCE_INLINE void tdGetVnodeDir(const char *baseDir, int vid, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/vnode/vnode%d", baseDir, vid);
}
static FORCE_INLINE void tdGetVnodeBackDir(char *baseDir, int vid, char *dirName) {
static FORCE_INLINE void tdGetVnodeBackDir(const char *baseDir, int vid, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/vnode_bak/vnode%d", baseDir, vid);
}
static FORCE_INLINE void tdGetTsdbRootDir(char *baseDir, int vid, char *dirName) {
static FORCE_INLINE void tdGetTsdbRootDir(const char *baseDir, int vid, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/vnode/vnode%d/tsdb", baseDir, vid);
}
static FORCE_INLINE void tdGetTsdbDataDir(char *baseDir, int vid, char *dirName) {
static FORCE_INLINE void tdGetTsdbDataDir(const char *baseDir, int vid, char *dirName) {
snprintf(dirName, TSDB_FILENAME_LEN, "%s/vnode/vnode%d/tsdb/data", baseDir, vid);
}
......
......@@ -160,7 +160,7 @@ SDisk *tdAssignDisk(SDnodeTier *pDnodeTier, int level) {
tdUnLockTiers(pDnodeTier);
return NULL;
return pDisk;
}
SDisk *tdGetDiskByName(SDnodeTier *pDnodeTier, char *dirName) {
......
......@@ -48,6 +48,7 @@ IF (TD_LINUX)
COMMAND ${CMAKE_COMMAND} -E echo dataDir ${TD_TESTS_OUTPUT_DIR}/data > ${TD_TESTS_OUTPUT_DIR}/cfg/taos.cfg
COMMAND ${CMAKE_COMMAND} -E echo logDir ${TD_TESTS_OUTPUT_DIR}/log >> ${TD_TESTS_OUTPUT_DIR}/cfg/taos.cfg
COMMAND ${CMAKE_COMMAND} -E echo charset UTF-8 >> ${TD_TESTS_OUTPUT_DIR}/cfg/taos.cfg
COMMAND ${CMAKE_COMMAND} -E echo monitor 0 >> ${TD_TESTS_OUTPUT_DIR}/cfg/taos.cfg
COMMENT "prepare taosd environment")
ADD_CUSTOM_TARGET(${PREPARE_ENV_TARGET} ALL WORKING_DIRECTORY ${TD_EXECUTABLE_OUTPUT_PATH} DEPENDS ${PREPARE_ENV_CMD})
ENDIF ()
......@@ -209,7 +209,7 @@ static int32_t dnodeInitStorage() {
return -1;
}
tdGetVnodeBackRootDir(dirName, pDisk->dir);
tdGetVnodeBackRootDir(pDisk->dir, dirName);
if (dnodeCreateDir(dirName) < 0) {
dError("failed to create vnode back dir: %s, reason: %s", dirName, strerror(errno));
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册