refactor
This commit is contained in:
parent
e5021e77ea
commit
29ed1d2590
|
@ -131,7 +131,6 @@ extern char tsDataDir[];
|
||||||
extern char tsLogDir[];
|
extern char tsLogDir[];
|
||||||
extern char tsScriptDir[];
|
extern char tsScriptDir[];
|
||||||
extern int64_t tsMsPerDay[3];
|
extern int64_t tsMsPerDay[3];
|
||||||
extern char tsVnodeBakDir[];
|
|
||||||
|
|
||||||
// system info
|
// system info
|
||||||
extern char tsOsName[];
|
extern char tsOsName[];
|
||||||
|
|
|
@ -160,7 +160,6 @@ 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};
|
||||||
char tsVnodeBakDir[TSDB_FILENAME_LEN] = {0};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* minimum scale for whole system, millisecond by default
|
* minimum scale for whole system, millisecond by default
|
||||||
|
|
|
@ -181,15 +181,17 @@ static int32_t dnodeInitStorage() {
|
||||||
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);
|
||||||
|
tdGetVnodeRootDir(tsDataDir, tsVnodeDir);
|
||||||
|
|
||||||
//TODO(dengyihao): no need to init here
|
//TODO(dengyihao): no need to init here
|
||||||
tdGetMnodeRootDir(DNODE_PRIMARY_DISK(pDnodeTier)->dir, tsMnodeDir);
|
tdGetMnodeRootDir(tsDataDir, tsMnodeDir);
|
||||||
if (dnodeCreateDir(tsMnodeDir) < 0) {
|
if (dnodeCreateDir(tsMnodeDir) < 0) {
|
||||||
dError("failed to create dir: %s, reason: %s", tsMnodeDir, strerror(errno));
|
dError("failed to create dir: %s, reason: %s", tsMnodeDir, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tdGetDnodeRootDir(DNODE_PRIMARY_DISK(pDnodeTier)->dir, tsDnodeDir);
|
tdGetDnodeRootDir(tsDataDir, tsDnodeDir);
|
||||||
if (dnodeCreateDir(tsDnodeDir) < 0) {
|
if (dnodeCreateDir(tsDnodeDir) < 0) {
|
||||||
dError("failed to create dir: %s, reason: %s", tsDnodeDir, strerror(errno));
|
dError("failed to create dir: %s, reason: %s", tsDnodeDir, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue