Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2fcf9dc6
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2fcf9dc6
编写于
2月 24, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
charset
上级
0d0841d1
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
16 addition
and
57 deletion
+16
-57
include/dnode/mgmt/dnode.h
include/dnode/mgmt/dnode.h
+0
-5
include/dnode/mnode/mnode.h
include/dnode/mnode/mnode.h
+0
-5
source/dnode/mgmt/daemon/src/dmnCfg.c
source/dnode/mgmt/daemon/src/dmnCfg.c
+0
-5
source/dnode/mgmt/impl/src/dndEnv.c
source/dnode/mgmt/impl/src/dndEnv.c
+0
-3
source/dnode/mgmt/impl/src/dndMgmt.c
source/dnode/mgmt/impl/src/dndMgmt.c
+3
-3
source/dnode/mgmt/impl/src/dndMnode.c
source/dnode/mgmt/impl/src/dndMnode.c
+0
-5
source/dnode/mnode/impl/inc/mndInt.h
source/dnode/mnode/impl/inc/mndInt.h
+1
-0
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+9
-9
source/dnode/mnode/impl/src/mndTelem.c
source/dnode/mnode/impl/src/mndTelem.c
+3
-7
source/dnode/mnode/impl/src/mnode.c
source/dnode/mnode/impl/src/mnode.c
+0
-15
未找到文件。
include/dnode/mgmt/dnode.h
浏览文件 @
2fcf9dc6
...
...
@@ -34,11 +34,6 @@ typedef struct {
bool
printAuth
;
int32_t
rpcTimer
;
int32_t
rpcMaxTime
;
char
timezone
[
TD_TIMEZONE_LEN
];
char
locale
[
TD_LOCALE_LEN
];
char
charset
[
TD_LOCALE_LEN
];
char
buildinfo
[
64
];
char
gitinfo
[
48
];
}
SDnodeEnvCfg
;
/**
...
...
include/dnode/mnode/mnode.h
浏览文件 @
2fcf9dc6
...
...
@@ -50,11 +50,6 @@ typedef struct SMnodeCfg {
bool
printAuth
;
int32_t
statusInterval
;
int32_t
shellActivityTimer
;
char
*
timezone
;
char
*
locale
;
char
*
charset
;
char
*
buildinfo
;
char
*
gitinfo
;
}
SMnodeCfg
;
typedef
struct
{
...
...
source/dnode/mgmt/daemon/src/dmnCfg.c
浏览文件 @
2fcf9dc6
...
...
@@ -184,11 +184,6 @@ SDnodeEnvCfg dmnGetEnvCfg(SConfig *pCfg) {
const
char
*
vstr
=
cfgGetItem
(
pCfg
,
"version"
)
->
str
;
envCfg
.
sver
=
30000000
;
tstrncpy
(
envCfg
.
buildinfo
,
cfgGetItem
(
pCfg
,
"buildinfo"
)
->
str
,
sizeof
(
envCfg
.
buildinfo
));
tstrncpy
(
envCfg
.
gitinfo
,
cfgGetItem
(
pCfg
,
"gitinfo"
)
->
str
,
sizeof
(
envCfg
.
gitinfo
));
tstrncpy
(
envCfg
.
timezone
,
cfgGetItem
(
pCfg
,
"timezone"
)
->
str
,
sizeof
(
envCfg
.
timezone
));
tstrncpy
(
envCfg
.
locale
,
cfgGetItem
(
pCfg
,
"locale"
)
->
str
,
sizeof
(
envCfg
.
locale
));
tstrncpy
(
envCfg
.
charset
,
cfgGetItem
(
pCfg
,
"charset"
)
->
str
,
sizeof
(
envCfg
.
charset
));
envCfg
.
numOfCores
=
cfgGetItem
(
pCfg
,
"numOfCores"
)
->
i32
;
envCfg
.
numOfCommitThreads
=
(
uint16_t
)
cfgGetItem
(
pCfg
,
"numOfCommitThreads"
)
->
i32
;
envCfg
.
enableTelem
=
cfgGetItem
(
pCfg
,
"telemetryReporting"
)
->
bval
;
...
...
source/dnode/mgmt/impl/src/dndEnv.c
浏览文件 @
2fcf9dc6
...
...
@@ -285,9 +285,6 @@ int32_t dndInit(const SDnodeEnvCfg *pCfg) {
SVnodeOpt
vnodeOpt
=
{
.
sver
=
pCfg
->
sver
,
.
timezone
=
pCfg
->
timezone
,
.
locale
=
pCfg
->
locale
,
.
charset
=
pCfg
->
charset
,
.
nthreads
=
pCfg
->
numOfCommitThreads
,
.
putReqToVQueryQFp
=
dndPutReqToVQueryQ
,
.
sendReqToDnodeFp
=
dndSendReqToDnode
...
...
source/dnode/mgmt/impl/src/dndMgmt.c
浏览文件 @
2fcf9dc6
...
...
@@ -371,9 +371,9 @@ void dndSendStatusReq(SDnode *pDnode) {
req
.
clusterCfg
.
checkTime
=
0
;
char
timestr
[
32
]
=
"1970-01-01 00:00:00.00"
;
(
void
)
taosParseTime
(
timestr
,
&
req
.
clusterCfg
.
checkTime
,
(
int32_t
)
strlen
(
timestr
),
TSDB_TIME_PRECISION_MILLI
,
0
);
memcpy
(
req
.
clusterCfg
.
timezone
,
pDnode
->
env
.
timezone
,
TD_TIMEZONE_LEN
);
memcpy
(
req
.
clusterCfg
.
locale
,
pDnode
->
env
.
locale
,
TD_LOCALE_LEN
);
memcpy
(
req
.
clusterCfg
.
charset
,
pDnode
->
env
.
charset
,
TD_LOCALE_LEN
);
memcpy
(
req
.
clusterCfg
.
timezone
,
osTimezone
()
,
TD_TIMEZONE_LEN
);
memcpy
(
req
.
clusterCfg
.
locale
,
osLocale
()
,
TD_LOCALE_LEN
);
memcpy
(
req
.
clusterCfg
.
charset
,
osCharset
()
,
TD_LOCALE_LEN
);
taosRUnLockLatch
(
&
pMgmt
->
latch
);
req
.
pVloads
=
taosArrayInit
(
TSDB_MAX_VNODES
,
sizeof
(
SVnodeLoad
));
...
...
source/dnode/mgmt/impl/src/dndMnode.c
浏览文件 @
2fcf9dc6
...
...
@@ -277,11 +277,6 @@ static void dndInitMnodeOption(SDnode *pDnode, SMnodeOpt *pOption) {
pOption
->
cfg
.
enableTelem
=
pDnode
->
env
.
enableTelem
;
pOption
->
cfg
.
statusInterval
=
pDnode
->
cfg
.
statusInterval
;
pOption
->
cfg
.
shellActivityTimer
=
pDnode
->
cfg
.
shellActivityTimer
;
pOption
->
cfg
.
timezone
=
pDnode
->
env
.
timezone
;
pOption
->
cfg
.
charset
=
pDnode
->
env
.
charset
;
pOption
->
cfg
.
locale
=
pDnode
->
env
.
locale
;
pOption
->
cfg
.
gitinfo
=
pDnode
->
env
.
gitinfo
;
pOption
->
cfg
.
buildinfo
=
pDnode
->
env
.
buildinfo
;
}
static
void
dndBuildMnodeDeployOption
(
SDnode
*
pDnode
,
SMnodeOpt
*
pOption
)
{
...
...
source/dnode/mnode/impl/inc/mndInt.h
浏览文件 @
2fcf9dc6
...
...
@@ -24,6 +24,7 @@
#include "tqueue.h"
#include "ttime.h"
#include "wal.h"
#include "version.h"
#ifdef __cplusplus
extern
"C"
{
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
2fcf9dc6
...
...
@@ -277,19 +277,19 @@ static int32_t mndCheckClusterCfgPara(SMnode *pMnode, const SClusterCfg *pCfg) {
return
DND_REASON_STATUS_INTERVAL_NOT_MATCH
;
}
if
((
0
!=
strcasecmp
(
pCfg
->
timezone
,
pMnode
->
cfg
.
timezone
))
&&
(
pMnode
->
checkTime
!=
pCfg
->
checkTime
))
{
mError
(
"timezone [%s - %s] [%"
PRId64
" - %"
PRId64
"] cfg inconsistent"
,
pCfg
->
timezone
,
pMnode
->
cfg
.
timezone
,
if
((
0
!=
strcasecmp
(
pCfg
->
timezone
,
osTimezone
()
))
&&
(
pMnode
->
checkTime
!=
pCfg
->
checkTime
))
{
mError
(
"timezone [%s - %s] [%"
PRId64
" - %"
PRId64
"] cfg inconsistent"
,
pCfg
->
timezone
,
osTimezone
()
,
pCfg
->
checkTime
,
pMnode
->
checkTime
);
return
DND_REASON_TIME_ZONE_NOT_MATCH
;
}
if
(
0
!=
strcasecmp
(
pCfg
->
locale
,
pMnode
->
cfg
.
locale
))
{
mError
(
"locale [%s - %s] cfg inconsistent"
,
pCfg
->
locale
,
pMnode
->
cfg
.
locale
);
if
(
0
!=
strcasecmp
(
pCfg
->
locale
,
osLocale
()
))
{
mError
(
"locale [%s - %s] cfg inconsistent"
,
pCfg
->
locale
,
osLocale
()
);
return
DND_REASON_LOCALE_NOT_MATCH
;
}
if
(
0
!=
strcasecmp
(
pCfg
->
charset
,
pMnode
->
cfg
.
charset
))
{
mError
(
"charset [%s - %s] cfg inconsistent."
,
pCfg
->
charset
,
pMnode
->
cfg
.
charset
);
if
(
0
!=
strcasecmp
(
pCfg
->
charset
,
osCharset
()
))
{
mError
(
"charset [%s - %s] cfg inconsistent."
,
pCfg
->
charset
,
osCharset
()
);
return
DND_REASON_CHARSET_NOT_MATCH
;
}
...
...
@@ -670,15 +670,15 @@ static int32_t mndRetrieveConfigs(SMnodeMsg *pReq, SShowObj *pShow, char *data,
numOfRows
++
;
cfgOpts
[
numOfRows
]
=
"timezone"
;
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
pMnode
->
cfg
.
timezone
);
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
osTimezone
()
);
numOfRows
++
;
cfgOpts
[
numOfRows
]
=
"locale"
;
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
pMnode
->
cfg
.
locale
);
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
osLocale
()
);
numOfRows
++
;
cfgOpts
[
numOfRows
]
=
"charset"
;
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
pMnode
->
cfg
.
charset
);
snprintf
(
cfgVals
[
numOfRows
],
TSDB_CONIIG_VALUE_LEN
,
"%s"
,
osCharset
()
);
numOfRows
++
;
for
(
int32_t
i
=
0
;
i
<
numOfRows
;
i
++
)
{
...
...
source/dnode/mnode/impl/src/mndTelem.c
浏览文件 @
2fcf9dc6
...
...
@@ -138,13 +138,9 @@ static void mndAddMemoryInfo(SMnode* pMnode, SBufferWriter* bw) {
static
void
mndAddVersionInfo
(
SMnode
*
pMnode
,
SBufferWriter
*
bw
)
{
STelemMgmt
*
pMgmt
=
&
pMnode
->
telemMgmt
;
char
vstr
[
32
]
=
{
0
};
taosVersionIntToStr
(
pMnode
->
cfg
.
sver
,
vstr
,
32
);
mndAddStringField
(
bw
,
"version"
,
vstr
);
mndAddStringField
(
bw
,
"buildInfo"
,
pMnode
->
cfg
.
buildinfo
);
mndAddStringField
(
bw
,
"gitInfo"
,
pMnode
->
cfg
.
gitinfo
);
mndAddStringField
(
bw
,
"version"
,
version
);
mndAddStringField
(
bw
,
"buildInfo"
,
buildinfo
);
mndAddStringField
(
bw
,
"gitInfo"
,
gitinfo
);
mndAddStringField
(
bw
,
"email"
,
pMgmt
->
email
);
}
...
...
source/dnode/mnode/impl/src/mnode.c
浏览文件 @
2fcf9dc6
...
...
@@ -294,11 +294,6 @@ static int32_t mndSetOptions(SMnode *pMnode, const SMnodeOpt *pOption) {
pMnode
->
cfg
.
enableTelem
=
pOption
->
cfg
.
enableTelem
;
pMnode
->
cfg
.
statusInterval
=
pOption
->
cfg
.
statusInterval
;
pMnode
->
cfg
.
shellActivityTimer
=
pOption
->
cfg
.
shellActivityTimer
;
pMnode
->
cfg
.
timezone
=
strdup
(
pOption
->
cfg
.
timezone
);
pMnode
->
cfg
.
locale
=
strdup
(
pOption
->
cfg
.
locale
);
pMnode
->
cfg
.
charset
=
strdup
(
pOption
->
cfg
.
charset
);
pMnode
->
cfg
.
gitinfo
=
strdup
(
pOption
->
cfg
.
gitinfo
);
pMnode
->
cfg
.
buildinfo
=
strdup
(
pOption
->
cfg
.
buildinfo
);
if
(
pMnode
->
sendReqToDnodeFp
==
NULL
||
pMnode
->
sendReqToMnodeFp
==
NULL
||
pMnode
->
sendRedirectRspFp
==
NULL
||
pMnode
->
putReqToMWriteQFp
==
NULL
||
pMnode
->
dnodeId
<
0
||
pMnode
->
clusterId
<
0
||
...
...
@@ -307,11 +302,6 @@ static int32_t mndSetOptions(SMnode *pMnode, const SMnodeOpt *pOption) {
return
-
1
;
}
if
(
pMnode
->
cfg
.
timezone
==
NULL
||
pMnode
->
cfg
.
locale
==
NULL
||
pMnode
->
cfg
.
charset
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
return
0
;
}
...
...
@@ -381,11 +371,6 @@ void mndClose(SMnode *pMnode) {
mDebug
(
"start to close mnode"
);
mndCleanupSteps
(
pMnode
,
-
1
);
tfree
(
pMnode
->
path
);
tfree
(
pMnode
->
cfg
.
charset
);
tfree
(
pMnode
->
cfg
.
locale
);
tfree
(
pMnode
->
cfg
.
timezone
);
tfree
(
pMnode
->
cfg
.
gitinfo
);
tfree
(
pMnode
->
cfg
.
buildinfo
);
tfree
(
pMnode
);
mDebug
(
"mnode is closed"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录