diff --git a/src/dnode/inc/dnodeInt.h b/src/dnode/inc/dnodeInt.h index 7abff373834a2f2ddf39dbffb1ebcaadc6991dc9..dd4a6b992e2e9b4a138fd75d4c9315871bd61a9e 100644 --- a/src/dnode/inc/dnodeInt.h +++ b/src/dnode/inc/dnodeInt.h @@ -24,6 +24,7 @@ extern "C" { #include "tlog.h" #include "trpc.h" #include "tglobal.h" +#include "tfs.h" #include "dnode.h" #include "vnode.h" diff --git a/src/dnode/src/dnodeSystem.c b/src/dnode/src/dnodeSystem.c index e9a452726a7495424987180f72de449e83f1a440..d8c7a10120ed06cbf87a589e1a733e0d0f90a380 100644 --- a/src/dnode/src/dnodeSystem.c +++ b/src/dnode/src/dnodeSystem.c @@ -120,7 +120,15 @@ int32_t main(int32_t argc, char *argv[]) { if (0 != dump_cluster) { taosInitGlobalCfg(); - taosReadGlobalCfg(); + if (!taosReadGlobalCfg()) { + printf("TDengine read global config failed\n"); + exit(EXIT_FAILURE); + } + if (tfsInit(tsDiskCfg, tsDiskCfgNum) < 0) { + printf("failed to init TFS since %s", tstrerror(terrno)); + return -1; + } + strncpy(tsDataDir, TFS_PRIMARY_PATH(), TSDB_FILENAME_LEN); grantParseParameter("-u"); exit(EXIT_SUCCESS); }