提交 44963201 编写于 作者: S Shengliang Guan

TD-1767

上级 28e6927d
...@@ -16,6 +16,7 @@ SET(TD_GRANT FALSE) ...@@ -16,6 +16,7 @@ SET(TD_GRANT FALSE)
SET(TD_SYNC TRUE) SET(TD_SYNC TRUE)
SET(TD_MQTT TRUE) SET(TD_MQTT TRUE)
SET(TD_TSDB_PLUGINS FALSE) SET(TD_TSDB_PLUGINS FALSE)
SET(TD_STORAGE FALSE)
SET(TD_COVER FALSE) SET(TD_COVER FALSE)
SET(TD_MEM_CHECK FALSE) SET(TD_MEM_CHECK FALSE)
......
...@@ -25,6 +25,10 @@ IF (TD_TSDB_PLUGINS) ...@@ -25,6 +25,10 @@ IF (TD_TSDB_PLUGINS)
ADD_DEFINITIONS(-D_TSDB_PLUGINS) ADD_DEFINITIONS(-D_TSDB_PLUGINS)
ENDIF () ENDIF ()
IF (TD_STORAGE)
ADD_DEFINITIONS(-D_STORAGE)
ENDIF ()
IF (TD_GODLL) IF (TD_GODLL)
ADD_DEFINITIONS(-D_TD_GO_DLL_) ADD_DEFINITIONS(-D_TD_GO_DLL_)
ENDIF () ENDIF ()
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
extern "C" { extern "C" {
#endif #endif
struct SDnodeTier;
// cluster // cluster
extern char tsFirst[]; extern char tsFirst[];
extern char tsSecond[]; extern char tsSecond[];
...@@ -157,9 +155,6 @@ extern char gitinfo[]; ...@@ -157,9 +155,6 @@ extern char gitinfo[];
extern char gitinfoOfInternal[]; extern char gitinfoOfInternal[];
extern char buildinfo[]; extern char buildinfo[];
// dnode
extern struct SDnodeTier *pDnodeTier;
// log // log
extern int32_t tsAsyncLog; extern int32_t tsAsyncLog;
extern int32_t tsNumOfLogLines; extern int32_t tsNumOfLogLines;
...@@ -182,6 +177,14 @@ extern int32_t wDebugFlag; ...@@ -182,6 +177,14 @@ extern int32_t wDebugFlag;
extern int32_t cqDebugFlag; extern int32_t cqDebugFlag;
extern int32_t debugFlag; extern int32_t debugFlag;
typedef struct {
char dir[TSDB_FILENAME_LEN];
int level;
int primary;
} SDiskCfg;
extern int32_t tsDiskCfgNum;
extern SDiskCfg tsDiskCfg[];
#define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize) #define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
void taosInitGlobalCfg(); void taosInitGlobalCfg();
...@@ -190,7 +193,10 @@ void taosSetAllDebugFlag(); ...@@ -190,7 +193,10 @@ void taosSetAllDebugFlag();
bool taosCfgDynamicOptions(char *msg); bool taosCfgDynamicOptions(char *msg);
int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port); int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port);
bool taosCheckBalanceCfgOptions(const char *option, int32_t *vnodeId, int32_t *dnodeId); bool taosCheckBalanceCfgOptions(const char *option, int32_t *vnodeId, int32_t *dnodeId);
void taosAddDataDir(int index, char *v1, int level, int primary);
void taosReadDataDirCfg(char *v1, char *v2, char *v3);
void taosPrintDataDirCfg();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -160,6 +160,13 @@ char tsDnodeDir[TSDB_FILENAME_LEN] = {0}; ...@@ -160,6 +160,13 @@ char tsDnodeDir[TSDB_FILENAME_LEN] = {0};
char tsMnodeDir[TSDB_FILENAME_LEN] = {0}; char tsMnodeDir[TSDB_FILENAME_LEN] = {0};
char tsDataDir[TSDB_FILENAME_LEN] = {0}; char tsDataDir[TSDB_FILENAME_LEN] = {0};
char tsScriptDir[TSDB_FILENAME_LEN] = {0}; char tsScriptDir[TSDB_FILENAME_LEN] = {0};
int32_t tsDiskCfgNum = 0;
#ifndef _STORAGE
SDiskCfg tsDiskCfg[1];
#else
SDiskCfg tsDiskCfg[TSDB_MAX_DISKS];
#endif
/* /*
* minimum scale for whole system, millisecond by default * minimum scale for whole system, millisecond by default
...@@ -305,6 +312,34 @@ bool taosCfgDynamicOptions(char *msg) { ...@@ -305,6 +312,34 @@ bool taosCfgDynamicOptions(char *msg) {
return false; return false;
} }
void taosAddDataDir(int index, char *v1, int level, int primary) {
tstrncpy(tsDiskCfg[index].dir, v1, TSDB_FILENAME_LEN);
tsDiskCfg[index].level = level;
tsDiskCfg[index].primary = primary;
uTrace("dataDir:%s, level:%d primary:%d is configured", v1, level, primary);
}
#ifndef _STORAGE
void taosReadDataDirCfg(char *v1, char *v2, char *v3) {
taosAddDataDir(0, tsDataDir, 0, 1);
tstrncpy(tsDiskCfg[0].dir, tsDataDir, TSDB_FILENAME_LEN);
}
#endif
void taosPrintDataDirCfg() {
for (int i = 0; i < tsDiskCfgNum; ++i) {
SDiskCfg *cfg = &tsDiskCfg[i];
uInfo(" dataDir:%s level:%d primary:%d", cfg->dir, cfg->level, cfg->primary);
}
}
static void taosCheckDataDirCfg() {
if (tsDiskCfgNum <= 0) {
taosAddDataDir(0, tsDataDir, 0, 1);
tsDiskCfgNum = 1;
}
}
static void doInitGlobalConfig(void) { static void doInitGlobalConfig(void) {
osInit(); osInit();
srand(taosSafeRand()); srand(taosSafeRand());
...@@ -386,7 +421,7 @@ static void doInitGlobalConfig(void) { ...@@ -386,7 +421,7 @@ static void doInitGlobalConfig(void) {
cfg.option = "dataDir"; cfg.option = "dataDir";
cfg.ptr = tsDataDir; cfg.ptr = tsDataDir;
cfg.valType = TAOS_CFG_VTYPE_DIRECTORY; cfg.valType = TAOS_CFG_VTYPE_DATA_DIRCTORY;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
cfg.minValue = 0; cfg.minValue = 0;
cfg.maxValue = 0; cfg.maxValue = 0;
...@@ -1328,6 +1363,7 @@ bool taosCheckGlobalCfg() { ...@@ -1328,6 +1363,7 @@ bool taosCheckGlobalCfg() {
snprintf(tsSecond, sizeof(tsSecond), "%s:%u", fqdn, port); snprintf(tsSecond, sizeof(tsSecond), "%s:%u", fqdn, port);
} }
taosCheckDataDirCfg();
taosGetSystemInfo(); taosGetSystemInfo();
tsSetLocale(); tsSetLocale();
......
...@@ -169,17 +169,17 @@ static void dnodeCheckDataDirOpenned(char *dir) { ...@@ -169,17 +169,17 @@ static void dnodeCheckDataDirOpenned(char *dir) {
} }
static int32_t dnodeInitStorage() { static int32_t dnodeInitStorage() {
pDnodeTier = dnodeNewTier(); tsDnodeTier = dnodeNewTier();
if (pDnodeTier == NULL) { if (tsDnodeTier == NULL) {
dError("failed to create new dnode tier since %s", tstrerror(terrno)); dError("failed to create new dnode tier since %s", tstrerror(terrno));
return -1; return -1;
} }
if (dnodeAddDisks(pDnodeTier, NULL, 0) < 0) { if (dnodeAddDisks(tsDnodeTier, tsDiskCfg, tsDiskCfgNum) < 0) {
dError("failed to add disks to dnode tier since %s", tstrerror(terrno)); dError("failed to add disks to dnode tier since %s", tstrerror(terrno));
return -1; return -1;
} }
strncpy(tsDataDir, DNODE_PRIMARY_DISK(pDnodeTier)->dir, TSDB_FILENAME_LEN); strncpy(tsDataDir, DNODE_PRIMARY_DISK(tsDnodeTier)->dir, TSDB_FILENAME_LEN);
tdGetVnodeRootDir(tsDataDir, tsVnodeDir); tdGetVnodeRootDir(tsDataDir, tsVnodeDir);
//TODO(dengyihao): no need to init here //TODO(dengyihao): no need to init here
...@@ -195,12 +195,12 @@ static int32_t dnodeInitStorage() { ...@@ -195,12 +195,12 @@ static int32_t dnodeInitStorage() {
return -1; return -1;
} }
for (int i = 0; i < pDnodeTier->nTiers; i++) { for (int i = 0; i < tsDnodeTier->nTiers; i++) {
char dirName[TSDB_FILENAME_LEN]; char dirName[TSDB_FILENAME_LEN];
STier *pTier = pDnodeTier->tiers + i; STier *pTier = tsDnodeTier->tiers + i;
for (int j = 0; j < pTier->nDisks; j++) { for (int j = 0; j < pTier->nDisks; j++) {
SDisk *pDisk = dnodeGetDisk(pDnodeTier, i, j); SDisk *pDisk = dnodeGetDisk(tsDnodeTier, i, j);
tdGetVnodeRootDir(dirName, pDisk->dir); tdGetVnodeRootDir(dirName, pDisk->dir);
if (dnodeCreateDir(dirName) < 0) { if (dnodeCreateDir(dirName) < 0) {
...@@ -223,9 +223,9 @@ static int32_t dnodeInitStorage() { ...@@ -223,9 +223,9 @@ static int32_t dnodeInitStorage() {
} }
static void dnodeCleanupStorage() { static void dnodeCleanupStorage() {
if (pDnodeTier) { if (tsDnodeTier) {
dnodeCloseTier(pDnodeTier); dnodeCloseTier(tsDnodeTier);
pDnodeTier = NULL; tsDnodeTier = NULL;
} }
} }
......
...@@ -40,7 +40,7 @@ SDnodeTier *dnodeNewTier() { ...@@ -40,7 +40,7 @@ SDnodeTier *dnodeNewTier() {
return NULL; return NULL;
} }
pDnodeTier->map = taosHashInit(DNODE_MAX_TIERS * DNODE_MAX_DISKS_PER_TIER * 2, pDnodeTier->map = taosHashInit(TSDB_MAX_TIERS * TSDB_MAX_DISKS_PER_TIER * 2,
taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK); taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK);
if (pDnodeTier->map == NULL) { if (pDnodeTier->map == NULL) {
terrno = TSDB_CODE_COM_OUT_OF_MEMORY; terrno = TSDB_CODE_COM_OUT_OF_MEMORY;
...@@ -217,7 +217,7 @@ static int dnodeAddDisk(SDnodeTier *pDnodeTier, char *dir, int level, int primar ...@@ -217,7 +217,7 @@ static int dnodeAddDisk(SDnodeTier *pDnodeTier, char *dir, int level, int primar
SDiskID diskid = {0}; SDiskID diskid = {0};
SDisk * pDisk = NULL; SDisk * pDisk = NULL;
if (level < 0 || level >= DNODE_MAX_TIERS) { if (level < 0 || level >= TSDB_MAX_TIERS) {
terrno = TSDB_CODE_DND_INVALID_DISK_TIER; terrno = TSDB_CODE_DND_INVALID_DISK_TIER;
dError("failed to add disk %s to tier %d level since %s", dir, level, tstrerror(terrno)); dError("failed to add disk %s to tier %d level since %s", dir, level, tstrerror(terrno));
return -1; return -1;
...@@ -231,7 +231,7 @@ static int dnodeAddDisk(SDnodeTier *pDnodeTier, char *dir, int level, int primar ...@@ -231,7 +231,7 @@ static int dnodeAddDisk(SDnodeTier *pDnodeTier, char *dir, int level, int primar
pTier = pDnodeTier->tiers + level; pTier = pDnodeTier->tiers + level;
diskid.level = level; diskid.level = level;
if (pTier->nDisks >= DNODE_MAX_DISKS_PER_TIER) { if (pTier->nDisks >= TSDB_MAX_DISKS_PER_TIER) {
terrno = TSDB_CODE_DND_TOO_MANY_DISKS; terrno = TSDB_CODE_DND_TOO_MANY_DISKS;
dError("failed to add disk %s to tier %d level since %s", dir, level, tstrerror(terrno)); dError("failed to add disk %s to tier %d level since %s", dir, level, tstrerror(terrno));
return -1; return -1;
...@@ -268,7 +268,7 @@ static int dnodeAddDisk(SDnodeTier *pDnodeTier, char *dir, int level, int primar ...@@ -268,7 +268,7 @@ static int dnodeAddDisk(SDnodeTier *pDnodeTier, char *dir, int level, int primar
diskid.did = pTier->nDisks; diskid.did = pTier->nDisks;
} else { } else {
diskid.did = pTier->nDisks + 1; diskid.did = pTier->nDisks + 1;
if (diskid.did >= DNODE_MAX_DISKS_PER_TIER) { if (diskid.did >= TSDB_MAX_DISKS_PER_TIER) {
terrno = TSDB_CODE_DND_TOO_MANY_DISKS; terrno = TSDB_CODE_DND_TOO_MANY_DISKS;
dError("failed to add disk %s to tier %d level since %s", dir, level, tstrerror(terrno)); dError("failed to add disk %s to tier %d level since %s", dir, level, tstrerror(terrno));
return -1; return -1;
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
extern "C" { extern "C" {
#endif #endif
#include "taosdef.h"
#include "tglobal.h"
#include "hash.h" #include "hash.h"
#include "taoserror.h" #include "taoserror.h"
#include "trpc.h" #include "trpc.h"
...@@ -71,16 +73,6 @@ void dnodeDelayReprocessMnodeWriteMsg(void *pMsg); ...@@ -71,16 +73,6 @@ void dnodeDelayReprocessMnodeWriteMsg(void *pMsg);
void dnodeSendStatusMsgToMnode(); void dnodeSendStatusMsgToMnode();
// DNODE TIER
#define DNODE_MAX_TIERS 3
#define DNODE_MAX_DISKS_PER_TIER 16
typedef struct {
char dir[TSDB_FILENAME_LEN];
int level;
int primary;
} SDiskCfg;
typedef struct { typedef struct {
int level; int level;
int did; int did;
...@@ -100,16 +92,17 @@ typedef struct { ...@@ -100,16 +92,17 @@ typedef struct {
typedef struct { typedef struct {
int level; int level;
int nDisks; int nDisks;
SDisk *disks[DNODE_MAX_DISKS_PER_TIER]; SDisk *disks[TSDB_MAX_DISKS_PER_TIER];
} STier; } STier;
typedef struct SDnodeTier { typedef struct SDnodeTier {
pthread_rwlock_t rwlock; pthread_rwlock_t rwlock;
int nTiers; int nTiers;
STier tiers[DNODE_MAX_TIERS]; STier tiers[TSDB_MAX_TIERS];
SHashObj * map; SHashObj * map;
} SDnodeTier; } SDnodeTier;
extern struct SDnodeTier *tsDnodeTier;
#define DNODE_PRIMARY_DISK(pDnodeTier) (pDnodeTier)->tiers[0].disks[0] #define DNODE_PRIMARY_DISK(pDnodeTier) (pDnodeTier)->tiers[0].disks[0]
static FORCE_INLINE int dnodeRLockTiers(SDnodeTier *pDnodeTier) { static FORCE_INLINE int dnodeRLockTiers(SDnodeTier *pDnodeTier) {
...@@ -155,7 +148,6 @@ int dnodeCheckTiers(SDnodeTier *pDnodeTier); ...@@ -155,7 +148,6 @@ int dnodeCheckTiers(SDnodeTier *pDnodeTier);
SDisk * dnodeAssignDisk(SDnodeTier *pDnodeTier, int level); SDisk * dnodeAssignDisk(SDnodeTier *pDnodeTier, int level);
SDisk * dnodeGetDiskByName(SDnodeTier *pDnodeTier, char *dirName); SDisk * dnodeGetDiskByName(SDnodeTier *pDnodeTier, char *dirName);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -432,6 +432,10 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size, void* buf ...@@ -432,6 +432,10 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size, void* buf
#define TAOS_QTYPE_CQ 3 #define TAOS_QTYPE_CQ 3
#define TAOS_QTYPE_QUERY 4 #define TAOS_QTYPE_QUERY 4
#define TSDB_MAX_TIERS 3
#define TSDB_MAX_DISKS_PER_TIER 16
#define TSDB_MAX_DISKS (TSDB_MAX_TIERS * TSDB_MAX_DISKS_PER_TIER)
typedef enum { typedef enum {
TSDB_SUPER_TABLE = 0, // super table TSDB_SUPER_TABLE = 0, // super table
TSDB_CHILD_TABLE = 1, // table created from super table TSDB_CHILD_TABLE = 1, // table created from super table
......
...@@ -533,7 +533,6 @@ void taosPrintOsInfo() { ...@@ -533,7 +533,6 @@ void taosPrintOsInfo() {
uInfo(" os release: %s", buf.release); uInfo(" os release: %s", buf.release);
uInfo(" os version: %s", buf.version); uInfo(" os version: %s", buf.version);
uInfo(" os machine: %s", buf.machine); uInfo(" os machine: %s", buf.machine);
uInfo("==================================");
} }
void taosKillSystem() { void taosKillSystem() {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "dnode.h" #include "dnode.h"
#include "tpath.h" #include "tpath.h"
struct SDnodeTier *pDnodeTier = NULL; struct SDnodeTier *tsDnodeTier = NULL;
const char * tsdbFileSuffix[] = {".head", ".data", ".last", ".stat", ".h", ".d", ".l", ".s"}; const char * tsdbFileSuffix[] = {".head", ".data", ".last", ".stat", ".h", ".d", ".l", ".s"};
static void tsdbDestroyFile(SFile *pFile); static void tsdbDestroyFile(SFile *pFile);
...@@ -79,8 +79,8 @@ int tsdbOpenFileH(STsdbRepo *pRepo) { ...@@ -79,8 +79,8 @@ int tsdbOpenFileH(STsdbRepo *pRepo) {
ASSERT(pRepo != NULL && pRepo->tsdbFileH != NULL); ASSERT(pRepo != NULL && pRepo->tsdbFileH != NULL);
char dataDir[TSDB_FILENAME_LEN] = "\0"; char dataDir[TSDB_FILENAME_LEN] = "\0";
for (int level = 0; level < pDnodeTier->nTiers; level++) { for (int level = 0; level < tsDnodeTier->nTiers; level++) {
STier *pTier = pDnodeTier->tiers + level; STier *pTier = tsDnodeTier->tiers + level;
for (int did = 0; did < pTier->nDisks; did++) { for (int did = 0; did < pTier->nDisks; did++) {
SDisk *pDisk = pTier->disks[did]; SDisk *pDisk = pTier->disks[did];
......
...@@ -29,3 +29,7 @@ ELSEIF (TD_WINDOWS) ...@@ -29,3 +29,7 @@ ELSEIF (TD_WINDOWS)
ELSEIF(TD_DARWIN) ELSEIF(TD_DARWIN)
TARGET_LINK_LIBRARIES(tutil iconv) TARGET_LINK_LIBRARIES(tutil iconv)
ENDIF() ENDIF()
IF (TD_STORAGE)
TARGET_LINK_LIBRARIES(tutil storage)
ENDIF ()
\ No newline at end of file
...@@ -47,6 +47,7 @@ enum { ...@@ -47,6 +47,7 @@ enum {
TAOS_CFG_VTYPE_STRING, TAOS_CFG_VTYPE_STRING,
TAOS_CFG_VTYPE_IPSTR, TAOS_CFG_VTYPE_IPSTR,
TAOS_CFG_VTYPE_DIRECTORY, TAOS_CFG_VTYPE_DIRECTORY,
TAOS_CFG_VTYPE_DATA_DIRCTORY,
}; };
enum { enum {
......
...@@ -199,7 +199,7 @@ SGlobalCfg *taosGetConfigOption(const char *option) { ...@@ -199,7 +199,7 @@ SGlobalCfg *taosGetConfigOption(const char *option) {
return NULL; return NULL;
} }
static void taosReadConfigOption(const char *option, char *value) { static void taosReadConfigOption(const char *option, char *value, char *value2, char *value3) {
for (int i = 0; i < tsGlobalConfigNum; ++i) { for (int i = 0; i < tsGlobalConfigNum; ++i) {
SGlobalCfg *cfg = tsGlobalConfig + i; SGlobalCfg *cfg = tsGlobalConfig + i;
if (!(cfg->cfgType & TSDB_CFG_CTYPE_B_CONFIG)) continue; if (!(cfg->cfgType & TSDB_CFG_CTYPE_B_CONFIG)) continue;
...@@ -224,6 +224,9 @@ static void taosReadConfigOption(const char *option, char *value) { ...@@ -224,6 +224,9 @@ static void taosReadConfigOption(const char *option, char *value) {
case TAOS_CFG_VTYPE_DIRECTORY: case TAOS_CFG_VTYPE_DIRECTORY:
taosReadDirectoryConfig(cfg, value); taosReadDirectoryConfig(cfg, value);
break; break;
case TAOS_CFG_VTYPE_DATA_DIRCTORY:
taosReadDirectoryConfig(cfg, value);
taosReadDataDirCfg(value, value2, value3);
default: default:
uError("config option:%s, input value:%s, can't be recognized", option, value); uError("config option:%s, input value:%s, can't be recognized", option, value);
break; break;
...@@ -307,8 +310,8 @@ void taosReadGlobalLogCfg() { ...@@ -307,8 +310,8 @@ void taosReadGlobalLogCfg() {
} }
bool taosReadGlobalCfg() { bool taosReadGlobalCfg() {
char * line, *option, *value, *value1; char * line, *option, *value, *value2, *value3;
int olen, vlen, vlen1; int olen, vlen, vlen2, vlen3;
char fileName[PATH_MAX] = {0}; char fileName[PATH_MAX] = {0};
sprintf(fileName, "%s/taos.cfg", configDir); sprintf(fileName, "%s/taos.cfg", configDir);
...@@ -331,8 +334,8 @@ bool taosReadGlobalCfg() { ...@@ -331,8 +334,8 @@ bool taosReadGlobalCfg() {
while (!feof(fp)) { while (!feof(fp)) {
memset(line, 0, len); memset(line, 0, len);
option = value = NULL; option = value = value2 = value3 = NULL;
olen = vlen = 0; olen = vlen = vlen2 = vlen3 = 0;
taosGetline(&line, &len, fp); taosGetline(&line, &len, fp);
line[len - 1] = 0; line[len - 1] = 0;
...@@ -345,11 +348,13 @@ bool taosReadGlobalCfg() { ...@@ -345,11 +348,13 @@ bool taosReadGlobalCfg() {
if (vlen == 0) continue; if (vlen == 0) continue;
value[vlen] = 0; value[vlen] = 0;
// For dataDir, the format is: paGetToken(value + vlen + 1, &value2, &vlen2);
// dataDir /mnt/disk1 0 if (vlen2 != 0) value2[vlen2] = 0;
paGetToken(value + vlen + 1, &value1, &vlen1);
paGetToken(value + vlen2 + 1, &value3, &vlen3);
taosReadConfigOption(option, value); if (vlen3 != 0) value3[vlen3] = 0;
taosReadConfigOption(option, value, value2, value3);
} }
fclose(fp); fclose(fp);
...@@ -397,4 +402,6 @@ void taosPrintGlobalCfg() { ...@@ -397,4 +402,6 @@ void taosPrintGlobalCfg() {
} }
taosPrintOsInfo(); taosPrintOsInfo();
taosPrintDataDirCfg();
uInfo("==================================");
} }
...@@ -418,8 +418,8 @@ void vnodeRelease(void *pVnodeRaw) { ...@@ -418,8 +418,8 @@ void vnodeRelease(void *pVnodeRaw) {
char rootDir[TSDB_FILENAME_LEN] = {0}; char rootDir[TSDB_FILENAME_LEN] = {0};
char newDir[TSDB_FILENAME_LEN] = {0}; char newDir[TSDB_FILENAME_LEN] = {0};
for (int i = 0; i < pDnodeTier->nTiers; i++) { for (int i = 0; i < tsDnodeTier->nTiers; i++) {
STier *pTier = pDnodeTier->tiers + i; STier *pTier = tsDnodeTier->tiers + i;
for (int j = 0; j < pTier->nDisks; j++) { for (int j = 0; j < pTier->nDisks; j++) {
SDisk *pDisk = pTier->disks[j]; SDisk *pDisk = pTier->disks[j];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册