Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6aab9380
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6aab9380
编写于
2月 24, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove mnode cfg
上级
5e3e0485
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
63 addition
and
47 deletion
+63
-47
include/dnode/mnode/mnode.h
include/dnode/mnode/mnode.h
+0
-9
include/os/osEnv.h
include/os/osEnv.h
+1
-0
source/common/src/tglobal.c
source/common/src/tglobal.c
+44
-9
source/dnode/mgmt/impl/src/dndMnode.c
source/dnode/mgmt/impl/src/dndMnode.c
+0
-2
source/dnode/mnode/impl/inc/mndInt.h
source/dnode/mnode/impl/inc/mndInt.h
+1
-1
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+6
-7
source/dnode/mnode/impl/src/mndProfile.c
source/dnode/mnode/impl/src/mndProfile.c
+3
-3
source/dnode/mnode/impl/src/mndShow.c
source/dnode/mnode/impl/src/mndShow.c
+1
-1
source/dnode/mnode/impl/src/mndTelem.c
source/dnode/mnode/impl/src/mndTelem.c
+1
-1
source/dnode/mnode/impl/src/mnode.c
source/dnode/mnode/impl/src/mnode.c
+1
-6
source/os/src/osEnv.c
source/os/src/osEnv.c
+2
-0
source/os/src/osLocale.c
source/os/src/osLocale.c
+1
-6
source/os/src/osSysinfo.c
source/os/src/osSysinfo.c
+1
-1
source/util/src/tconfig.c
source/util/src/tconfig.c
+1
-1
未找到文件。
include/dnode/mnode/mnode.h
浏览文件 @
6aab9380
...
...
@@ -44,21 +44,12 @@ typedef struct SMnodeLoad {
int64_t
compStorage
;
}
SMnodeLoad
;
typedef
struct
SMnodeCfg
{
int32_t
sver
;
bool
enableTelem
;
bool
printAuth
;
int32_t
statusInterval
;
int32_t
shellActivityTimer
;
}
SMnodeCfg
;
typedef
struct
{
int32_t
dnodeId
;
int64_t
clusterId
;
int8_t
replica
;
int8_t
selfIndex
;
SReplica
replicas
[
TSDB_MAX_REPLICA
];
SMnodeCfg
cfg
;
SDnode
*
pDnode
;
PutReqToMWriteQFp
putReqToMWriteQFp
;
PutReqToMReadQFp
putReqToMReadQFp
;
...
...
include/os/osEnv.h
浏览文件 @
6aab9380
...
...
@@ -47,6 +47,7 @@ void osSetLogReservedSpace(float sizeInGB);
void
osSetTempReservedSpace
(
float
sizeInGB
);
void
osSetDataReservedSpace
(
float
sizeInGB
);
void
osSetTimezone
(
const
char
*
timezone
);
void
osSetLocale
(
const
char
*
locale
,
const
char
*
charset
);
bool
osSetEnableCore
(
bool
enable
);
#ifdef __cplusplus
...
...
source/common/src/tglobal.c
浏览文件 @
6aab9380
...
...
@@ -246,9 +246,9 @@ static void taosAddClientCfg(SConfig *pCfg) {
cfgAddString
(
pCfg
,
"secondEp"
,
defaultSecondEp
,
1
);
cfgAddString
(
pCfg
,
"fqdn"
,
defaultFqdn
,
1
);
cfgAddInt32
(
pCfg
,
"serverPort"
,
defaultServerPort
,
1
,
65056
,
1
);
cfgAddDir
(
pCfg
,
"tempDir"
,
osTempDir
(),
1
);
cfgAddString
(
pCfg
,
"configDir"
,
configDir
,
1
);
cfgAddString
(
pCfg
,
"scriptDir"
,
configDir
,
1
);
cfgAddDir
(
pCfg
,
"tempDir"
,
osTempDir
(),
1
);
cfgAddFloat
(
pCfg
,
"minimalTempDirGB"
,
1
.
0
f
,
0
.
001
f
,
10000000
,
1
);
cfgAddFloat
(
pCfg
,
"numOfThreadsPerCore"
,
tsNumOfThreadsPerCore
,
0
,
10
,
1
);
cfgAddInt32
(
pCfg
,
"maxTmrCtrl"
,
tsMaxTmrCtrl
,
8
,
2048
,
1
);
...
...
@@ -262,17 +262,17 @@ static void taosAddClientCfg(SConfig *pCfg) {
cfgAddInt32
(
pCfg
,
"maxRegexStringLen"
,
tsMaxRegexStringLen
,
0
,
TSDB_MAX_FIELD_LEN
,
1
);
cfgAddInt32
(
pCfg
,
"maxNumOfOrderedRes"
,
tsMaxNumOfOrderedResults
,
128
,
TSDB_MAX_ALLOWED_SQL_LEN
,
1
);
cfgAddBool
(
pCfg
,
"keepColumnName"
,
tsKeepOriginalColumnName
,
1
);
cfgAddInt32
(
pCfg
,
"numOfCores"
,
1
,
1
,
100000
,
1
);
cfgAddBool
(
pCfg
,
"enableCoreFile"
,
0
,
1
);
cfgAddInt32
(
pCfg
,
"maxBinaryDisplayWidth"
,
tsMaxBinaryDisplayWidth
,
1
,
65536
,
1
);
cfgAddTimezone
(
pCfg
,
"timezone"
,
osTimezone
());
cfgAddLocale
(
pCfg
,
"locale"
,
osLocale
());
cfgAddCharset
(
pCfg
,
"charset"
,
osCharset
());
cfgAddBool
(
pCfg
,
"enableCoreFile"
,
0
,
1
);
cfgAddInt32
(
pCfg
,
"numOfCores"
,
tsNumOfCores
,
1
,
100000
,
1
);
cfgAddString
(
pCfg
,
"version"
,
version
,
1
);
cfgAddString
(
pCfg
,
"compatible_version"
,
compatible_version
,
1
);
cfgAddString
(
pCfg
,
"gitinfo"
,
gitinfo
,
1
);
cfgAddString
(
pCfg
,
"gitinfoOfInternal"
,
gitinfoOfInternal
,
1
);
cfgAddString
(
pCfg
,
"buildinfo"
,
buildinfo
,
1
);
cfgAddTimezone
(
pCfg
,
"timezone"
,
osTimezone
());
cfgAddLocale
(
pCfg
,
"locale"
,
osLocale
());
cfgAddCharset
(
pCfg
,
"charset"
,
osCharset
());
}
static
void
taosAddServerCfg
(
SConfig
*
pCfg
)
{
...
...
@@ -325,20 +325,37 @@ static void taosSetServerLogCfg(SConfig *pCfg) {
}
static
void
taosSetClientCfg
(
SConfig
*
pCfg
)
{
osSetTempDir
(
cfgGetItem
(
pCfg
,
"tempDir"
)
->
str
);
osSetDataReservedSpace
(
cfgGetItem
(
pCfg
,
"minimalTempDirGB"
)
->
fval
);
tstrncpy
(
tsFirst
,
cfgGetItem
(
pCfg
,
"firstEp"
)
->
str
,
TSDB_EP_LEN
);
tstrncpy
(
tsSecond
,
cfgGetItem
(
pCfg
,
"secondEp"
)
->
str
,
TSDB_EP_LEN
);
tstrncpy
(
tsLocalFqdn
,
cfgGetItem
(
pCfg
,
"fqdn"
)
->
str
,
TSDB_EP_LEN
);
tsServerPort
=
(
uint16_t
)
cfgGetItem
(
pCfg
,
"serverPort"
)
->
i32
;
snprintf
(
tsLocalEp
,
sizeof
(
tsLocalEp
),
"%s:%u"
,
tsLocalFqdn
,
tsServerPort
);
osSetTempDir
(
cfgGetItem
(
pCfg
,
"tempDir"
)
->
str
);
osSetDataReservedSpace
(
cfgGetItem
(
pCfg
,
"minimalTempDirGB"
)
->
fval
);
tsNumOfThreadsPerCore
=
cfgGetItem
(
pCfg
,
"maxTmrCtrl"
)
->
fval
;
tsMaxTmrCtrl
=
cfgGetItem
(
pCfg
,
"maxTmrCtrl"
)
->
i32
;
tsRpcTimer
=
cfgGetItem
(
pCfg
,
"rpcTimer"
)
->
i32
;
tsRpcMaxTime
=
cfgGetItem
(
pCfg
,
"rpcMaxTime"
)
->
i32
;
tsRpcForceTcp
=
cfgGetItem
(
pCfg
,
"rpcForceTcp"
)
->
i32
;
tsShellActivityTimer
=
cfgGetItem
(
pCfg
,
"shellActivityTimer"
)
->
bval
;
tsCompressMsgSize
=
cfgGetItem
(
pCfg
,
"compressMsgSize"
)
->
i32
;
tsCompressColData
=
cfgGetItem
(
pCfg
,
"compressColData"
)
->
i32
;
tsMaxWildCardsLen
=
cfgGetItem
(
pCfg
,
"maxWildCardsLength"
)
->
i32
;
tsMaxRegexStringLen
=
cfgGetItem
(
pCfg
,
"maxRegexStringLen"
)
->
i32
;
tsMaxNumOfOrderedResults
=
cfgGetItem
(
pCfg
,
"maxNumOfOrderedRes"
)
->
i32
;
tsKeepOriginalColumnName
=
cfgGetItem
(
pCfg
,
"keepColumnName"
)
->
bval
;
tsMaxBinaryDisplayWidth
=
cfgGetItem
(
pCfg
,
"maxBinaryDisplayWidth"
)
->
i32
;
SConfigItem
*
pItem
=
cfgGetItem
(
pCfg
,
"timezone"
);
osSetTimezone
(
pItem
->
str
);
uDebug
(
"timezone format changed from %s to %s"
,
pItem
->
str
,
osTimezone
());
cfgSetItem
(
pCfg
,
"timezone"
,
osTimezone
(),
pItem
->
stype
);
taosGetSystemInfo
();
const
char
*
locale
=
cfgGetItem
(
pCfg
,
"locale"
)
->
str
;
const
char
*
charset
=
cfgGetItem
(
pCfg
,
"charset"
)
->
str
;
osSetLocale
(
locale
,
charset
);
if
(
tsNumOfCores
<=
1
)
{
tsNumOfCores
=
2
;
}
...
...
@@ -354,7 +371,25 @@ static void taosSetServerCfg(SConfig *pCfg) {
osSetDataDir
(
cfgGetItem
(
pCfg
,
"dataDir"
)
->
str
);
osSetTempReservedSpace
(
cfgGetItem
(
pCfg
,
"minimalDataDirGB"
)
->
fval
);
tsNumOfCommitThreads
=
cfgGetItem
(
pCfg
,
"numOfCommitThreads"
)
->
i32
;
tsRatioOfQueryCores
=
cfgGetItem
(
pCfg
,
"ratioOfQueryCores"
)
->
fval
;
tsMaxNumOfDistinctResults
=
cfgGetItem
(
pCfg
,
"maxNumOfDistinctRes"
)
->
i32
;
tsEnableTelemetryReporting
=
cfgGetItem
(
pCfg
,
"telemetryReporting"
)
->
bval
;
tsMaxConnections
=
cfgGetItem
(
pCfg
,
"maxConnections"
)
->
i32
;
tsMaxShellConns
=
cfgGetItem
(
pCfg
,
"maxShellConns"
)
->
i32
;
tsStatusInterval
=
cfgGetItem
(
pCfg
,
"statusInterval"
)
->
i32
;
tsMinSlidingTime
=
cfgGetItem
(
pCfg
,
"minSlidingTime"
)
->
i32
;
tsMinIntervalTime
=
cfgGetItem
(
pCfg
,
"minIntervalTime"
)
->
i32
;
tsMaxStreamComputDelay
=
cfgGetItem
(
pCfg
,
"maxStreamCompDelay"
)
->
i32
;
tsStreamCompStartDelay
=
cfgGetItem
(
pCfg
,
"maxFirstStreamCompDelay"
)
->
i32
;
tsRetryStreamCompDelay
=
cfgGetItem
(
pCfg
,
"retryStreamCompDelay"
)
->
i32
;
tsStreamComputDelayRatio
=
cfgGetItem
(
pCfg
,
"streamCompDelayRatio"
)
->
fval
;
tsQueryBufferSize
=
cfgGetItem
(
pCfg
,
"queryBufferSize"
)
->
i32
;
tsRetrieveBlockingModel
=
cfgGetItem
(
pCfg
,
"retrieveBlockingModel"
)
->
bval
;
tsPrintAuth
=
cfgGetItem
(
pCfg
,
"printAuth"
)
->
bval
;
tsEnableSlaveQuery
=
cfgGetItem
(
pCfg
,
"slaveQuery"
)
->
bval
;
tsDeadLockKillQuery
=
cfgGetItem
(
pCfg
,
"deadLockKillQuery"
)
->
bval
;
if
(
tsQueryBufferSize
>=
0
)
{
tsQueryBufferSizeBytes
=
tsQueryBufferSize
*
1048576UL
;
}
...
...
source/dnode/mgmt/impl/src/dndMnode.c
浏览文件 @
6aab9380
...
...
@@ -273,8 +273,6 @@ static void dndInitMnodeOption(SDnode *pDnode, SMnodeOpt *pOption) {
pOption
->
putReqToMReadQFp
=
dndPutMsgToMReadQ
;
pOption
->
dnodeId
=
dndGetDnodeId
(
pDnode
);
pOption
->
clusterId
=
dndGetClusterId
(
pDnode
);
pOption
->
cfg
.
sver
=
tsVersion
;
pOption
->
cfg
.
enableTelem
=
tsEnableTelemetryReporting
;
}
static
void
dndBuildMnodeDeployOption
(
SDnode
*
pDnode
,
SMnodeOpt
*
pOption
)
{
...
...
source/dnode/mnode/impl/inc/mndInt.h
浏览文件 @
6aab9380
...
...
@@ -25,6 +25,7 @@
#include "ttime.h"
#include "wal.h"
#include "version.h"
#include "tglobal.h"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -81,7 +82,6 @@ typedef struct SMnode {
tmr_h
mqTimer
;
tmr_h
telemTimer
;
char
*
path
;
SMnodeCfg
cfg
;
int64_t
checkTime
;
SSdb
*
pSdb
;
SDnode
*
pDnode
;
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
6aab9380
...
...
@@ -237,7 +237,7 @@ int32_t mndGetDnodeSize(SMnode *pMnode) {
bool
mndIsDnodeOnline
(
SMnode
*
pMnode
,
SDnodeObj
*
pDnode
,
int64_t
curMs
)
{
int64_t
interval
=
TABS
(
pDnode
->
lastAccessTime
-
curMs
);
if
(
interval
>
3500
*
pMnode
->
cfg
.
s
tatusInterval
)
{
if
(
interval
>
3500
*
tsS
tatusInterval
)
{
if
(
pDnode
->
rebootTime
>
0
)
{
pDnode
->
offlineReason
=
DND_REASON_STATUS_MSG_TIMEOUT
;
}
...
...
@@ -272,8 +272,8 @@ static void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps) {
}
static
int32_t
mndCheckClusterCfgPara
(
SMnode
*
pMnode
,
const
SClusterCfg
*
pCfg
)
{
if
(
pCfg
->
statusInterval
!=
pMnode
->
cfg
.
s
tatusInterval
)
{
mError
(
"statusInterval [%d - %d] cfg inconsistent"
,
pCfg
->
statusInterval
,
pMnode
->
cfg
.
s
tatusInterval
);
if
(
pCfg
->
statusInterval
!=
tsS
tatusInterval
)
{
mError
(
"statusInterval [%d - %d] cfg inconsistent"
,
pCfg
->
statusInterval
,
tsS
tatusInterval
);
return
DND_REASON_STATUS_INTERVAL_NOT_MATCH
;
}
...
...
@@ -355,12 +355,11 @@ static int32_t mndProcessStatusReq(SMnodeMsg *pReq) {
bool
needCheck
=
!
online
||
dnodeChanged
||
reboot
;
if
(
needCheck
)
{
if
(
statusReq
.
sver
!=
pMnode
->
cfg
.
sver
)
{
if
(
statusReq
.
sver
!=
tsVersion
)
{
if
(
pDnode
!=
NULL
)
{
pDnode
->
offlineReason
=
DND_REASON_VERSION_NOT_MATCH
;
}
mError
(
"dnode:%d, status msg version:%d not match cluster:%d"
,
statusReq
.
dnodeId
,
statusReq
.
sver
,
pMnode
->
cfg
.
sver
);
mError
(
"dnode:%d, status msg version:%d not match cluster:%d"
,
statusReq
.
dnodeId
,
statusReq
.
sver
,
tsVersion
);
terrno
=
TSDB_CODE_MND_INVALID_MSG_VERSION
;
goto
PROCESS_STATUS_MSG_OVER
;
}
...
...
@@ -666,7 +665,7 @@ static int32_t mndRetrieveConfigs(SMnodeMsg *pReq, SShowObj *pShow, char *data,
int32_t
cols
=
0
;
cfgOpts
[
numOfRows
]
=
"statusInterval"
;
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%d"
,
pMnode
->
cfg
.
s
tatusInterval
);
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%d"
,
tsS
tatusInterval
);
numOfRows
++
;
cfgOpts
[
numOfRows
]
=
"timezone"
;
...
...
source/dnode/mnode/impl/src/mndProfile.c
浏览文件 @
6aab9380
...
...
@@ -63,7 +63,7 @@ static void mndCancelGetNextQuery(SMnode *pMnode, void *pIter);
int32_t
mndInitProfile
(
SMnode
*
pMnode
)
{
SProfileMgmt
*
pMgmt
=
&
pMnode
->
profileMgmt
;
int32_t
connCheckTime
=
pMnode
->
cfg
.
s
hellActivityTimer
*
2
;
int32_t
connCheckTime
=
tsS
hellActivityTimer
*
2
;
pMgmt
->
cache
=
taosCacheInit
(
TSDB_DATA_TYPE_INT
,
connCheckTime
,
true
,
(
__cache_free_fn_t
)
mndFreeConn
,
"conn"
);
if
(
pMgmt
->
cache
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -117,7 +117,7 @@ static SConnObj *mndCreateConn(SMnode *pMnode, SRpcConnInfo *pInfo, int32_t pid,
tstrncpy
(
connObj
.
user
,
pInfo
->
user
,
TSDB_USER_LEN
);
tstrncpy
(
connObj
.
app
,
app
,
TSDB_APP_NAME_LEN
);
int32_t
keepTime
=
pMnode
->
cfg
.
s
hellActivityTimer
*
3
;
int32_t
keepTime
=
tsS
hellActivityTimer
*
3
;
SConnObj
*
pConn
=
taosCachePut
(
pMgmt
->
cache
,
&
connId
,
sizeof
(
int32_t
),
&
connObj
,
sizeof
(
connObj
),
keepTime
*
1000
);
if
(
pConn
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -143,7 +143,7 @@ static SConnObj *mndAcquireConn(SMnode *pMnode, int32_t connId) {
return
NULL
;
}
int32_t
keepTime
=
pMnode
->
cfg
.
s
hellActivityTimer
*
3
;
int32_t
keepTime
=
tsS
hellActivityTimer
*
3
;
pConn
->
lastAccessTimeMs
=
keepTime
*
1000
+
(
uint64_t
)
taosGetTimestampMs
();
mTrace
(
"conn:%d, acquired from cache, data:%p"
,
pConn
->
id
,
pConn
);
...
...
source/dnode/mnode/impl/src/mndShow.c
浏览文件 @
6aab9380
...
...
@@ -64,7 +64,7 @@ static SShowObj *mndCreateShowObj(SMnode *pMnode, SShowReq *pReq) {
memcpy
(
showObj
.
db
,
pReq
->
db
,
TSDB_DB_FNAME_LEN
);
memcpy
(
showObj
.
payload
,
pReq
->
payload
,
pReq
->
payloadLen
);
int32_t
keepTime
=
pMnode
->
cfg
.
s
hellActivityTimer
*
6
*
1000
;
int32_t
keepTime
=
tsS
hellActivityTimer
*
6
*
1000
;
SShowObj
*
pShow
=
taosCachePut
(
pMgmt
->
cache
,
&
showId
,
sizeof
(
int64_t
),
&
showObj
,
size
,
keepTime
);
if
(
pShow
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
source/dnode/mnode/impl/src/mndTelem.c
浏览文件 @
6aab9380
...
...
@@ -266,7 +266,7 @@ static void mndGetEmail(SMnode* pMnode, char* filepath) {
int32_t
mndInitTelem
(
SMnode
*
pMnode
)
{
STelemMgmt
*
pMgmt
=
&
pMnode
->
telemMgmt
;
pMgmt
->
enable
=
pMnode
->
cfg
.
enableTelem
;
pMgmt
->
enable
=
tsEnableTelemetryReporting
;
taosInitRWLatch
(
&
pMgmt
->
lock
);
mndGetEmail
(
pMnode
,
"/usr/local/taos/email"
);
...
...
source/dnode/mnode/impl/src/mnode.c
浏览文件 @
6aab9380
...
...
@@ -290,14 +290,9 @@ static int32_t mndSetOptions(SMnode *pMnode, const SMnodeOpt *pOption) {
pMnode
->
sendReqToDnodeFp
=
pOption
->
sendReqToDnodeFp
;
pMnode
->
sendReqToMnodeFp
=
pOption
->
sendReqToMnodeFp
;
pMnode
->
sendRedirectRspFp
=
pOption
->
sendRedirectRspFp
;
pMnode
->
cfg
.
sver
=
pOption
->
cfg
.
sver
;
pMnode
->
cfg
.
enableTelem
=
pOption
->
cfg
.
enableTelem
;
pMnode
->
cfg
.
statusInterval
=
pOption
->
cfg
.
statusInterval
;
pMnode
->
cfg
.
shellActivityTimer
=
pOption
->
cfg
.
shellActivityTimer
;
if
(
pMnode
->
sendReqToDnodeFp
==
NULL
||
pMnode
->
sendReqToMnodeFp
==
NULL
||
pMnode
->
sendRedirectRspFp
==
NULL
||
pMnode
->
putReqToMWriteQFp
==
NULL
||
pMnode
->
dnodeId
<
0
||
pMnode
->
clusterId
<
0
||
pMnode
->
cfg
.
statusInterval
<
1
)
{
pMnode
->
putReqToMWriteQFp
==
NULL
||
pMnode
->
dnodeId
<
0
||
pMnode
->
clusterId
<
0
)
{
terrno
=
TSDB_CODE_MND_INVALID_OPTIONS
;
return
-
1
;
}
...
...
source/os/src/osEnv.c
浏览文件 @
6aab9380
...
...
@@ -74,10 +74,12 @@ void osSetLogReservedSpace(float sizeInGB) { env.logSpace.reserved = sizeInGB; }
void
osSetTempReservedSpace
(
float
sizeInGB
)
{
env
.
tempSpace
.
reserved
=
sizeInGB
;
}
void
osSetDataReservedSpace
(
float
sizeInGB
)
{
env
.
dataSpace
.
reserved
=
sizeInGB
;
}
void
osSetTimezone
(
const
char
*
timezone
)
{
taosSetSystemTimezone
(
timezone
,
env
.
timezone
,
&
env
.
daylight
);
}
void
osSetLocale
(
const
char
*
locale
,
const
char
*
charset
)
{
taosSetSystemLocale
(
locale
,
charset
);
}
bool
osSetEnableCore
(
bool
enable
)
{
env
.
enableCoreFile
=
enable
;
}
void
osInit
()
{
srand
(
taosSafeRand
());
taosGetSystemInfo
();
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
taosWinSocketInit
();
...
...
source/os/src/osLocale.c
浏览文件 @
6aab9380
...
...
@@ -75,15 +75,10 @@ void taosSetSystemLocale(const char *inLocale, const char *inCharSet) {
char
*
locale
=
setlocale
(
LC_CTYPE
,
inLocale
);
// default locale or user specified locale is not valid, abort launch
if
(
inLocale
==
NULL
)
{
if
(
inLocale
==
NULL
||
strlen
(
inCharSet
)
==
0
)
{
printf
(
"Invalid locale:%s, please set the valid locale in config file
\n
"
,
inLocale
);
}
if
(
strlen
(
inCharSet
)
==
0
)
{
printf
(
"failed to get charset, please set the valid charset in config file
\n
"
);
exit
(
-
1
);
}
if
(
!
taosValidateEncodec
(
inCharSet
))
{
printf
(
"Invalid charset:%s, please set the valid charset in config file"
,
inCharSet
);
exit
(
-
1
);
...
...
source/os/src/osSysinfo.c
浏览文件 @
6aab9380
...
...
@@ -20,7 +20,7 @@ int32_t tsTotalMemoryMB = 0;
int64_t
tsPageSize
=
0
;
int64_t
tsOpenMax
=
0
;
int64_t
tsStreamMax
=
0
;
int32_t
tsNumOfCores
=
1
;
int32_t
tsNumOfCores
=
2
;
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
/*
...
...
source/util/src/tconfig.c
浏览文件 @
6aab9380
...
...
@@ -20,7 +20,7 @@
#include "tutil.h"
#include "ulog.h"
#define CFG_NAME_PRINT_LEN 2
2
#define CFG_NAME_PRINT_LEN 2
4
#define CFG_SRC_PRINT_LEN 12
typedef
struct
SConfig
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录