Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
778b88a1
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看板
未验证
提交
778b88a1
编写于
8月 15, 2023
作者:
W
wade zhang
提交者:
GitHub
8月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #22440 from taosdata/fix/retry_resolve_fqdn
merge fix/retry_resolve_fqdn to main
上级
ff17763e
8a0e9ff0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
1 deletion
+21
-1
include/common/tglobal.h
include/common/tglobal.h
+1
-0
source/common/src/tglobal.c
source/common/src/tglobal.c
+3
-0
source/libs/sync/src/syncUtil.c
source/libs/sync/src/syncUtil.c
+17
-1
未找到文件。
include/common/tglobal.h
浏览文件 @
778b88a1
...
...
@@ -199,6 +199,7 @@ extern bool tsFilterScalarMode;
extern
int32_t
tsKeepTimeOffset
;
extern
int32_t
tsMaxStreamBackendCache
;
extern
int32_t
tsPQSortMemThreshold
;
extern
int32_t
tsResolveFQDNRetryTime
;
// #define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
...
...
source/common/src/tglobal.c
浏览文件 @
778b88a1
...
...
@@ -236,6 +236,7 @@ int64_t tsStreamBufferSize = 128 * 1024 * 1024;
int64_t
tsCheckpointInterval
=
3
*
60
*
60
*
1000
;
bool
tsFilterScalarMode
=
false
;
int32_t
tsKeepTimeOffset
=
0
;
// latency of data migration
int
tsResolveFQDNRetryTime
=
100
;
//seconds
#ifndef _STORAGE
int32_t
taosSetTfsCfg
(
SConfig
*
pCfg
)
{
...
...
@@ -580,6 +581,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if
(
cfgAddInt32
(
pCfg
,
"keepTimeOffset"
,
tsKeepTimeOffset
,
0
,
23
,
CFG_SCOPE_SERVER
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxStreamBackendCache"
,
tsMaxStreamBackendCache
,
16
,
1024
,
CFG_SCOPE_SERVER
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"pqSortMemThreshold"
,
tsPQSortMemThreshold
,
1
,
10240
,
CFG_SCOPE_SERVER
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"resolveFQDNRetryTime"
,
tsResolveFQDNRetryTime
,
1
,
10240
,
0
)
!=
0
)
return
-
1
;
GRANT_CFG_ADD
;
return
0
;
...
...
@@ -979,6 +981,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsKeepTimeOffset
=
cfgGetItem
(
pCfg
,
"keepTimeOffset"
)
->
i32
;
tsMaxStreamBackendCache
=
cfgGetItem
(
pCfg
,
"maxStreamBackendCache"
)
->
i32
;
tsPQSortMemThreshold
=
cfgGetItem
(
pCfg
,
"pqSortMemThreshold"
)
->
i32
;
tsResolveFQDNRetryTime
=
cfgGetItem
(
pCfg
,
"resolveFQDNRetryTime"
)
->
i32
;
GRANT_CFG_GET
;
return
0
;
...
...
source/libs/sync/src/syncUtil.c
浏览文件 @
778b88a1
...
...
@@ -21,6 +21,7 @@
#include "syncRaftCfg.h"
#include "syncRaftStore.h"
#include "syncSnapshot.h"
#include "tglobal.h"
void
syncCfg2SimpleStr
(
const
SSyncCfg
*
pCfg
,
char
*
buf
,
int32_t
bufLen
)
{
int32_t
len
=
snprintf
(
buf
,
bufLen
,
"{num:%d, as:%d, ["
,
pCfg
->
replicaNum
,
pCfg
->
myIndex
);
...
...
@@ -41,7 +42,22 @@ void syncUtilNodeInfo2EpSet(const SNodeInfo* pInfo, SEpSet* pEpSet) {
}
bool
syncUtilNodeInfo2RaftId
(
const
SNodeInfo
*
pInfo
,
SyncGroupId
vgId
,
SRaftId
*
raftId
)
{
uint32_t
ipv4
=
taosGetIpv4FromFqdn
(
pInfo
->
nodeFqdn
);
uint32_t
ipv4
=
0xFFFFFFFF
;
sDebug
(
"vgId:%d, start to resolve sync addr fqdn in %d seconds, "
"dnode:%d cluster:%"
PRId64
" fqdn:%s port:%u "
,
vgId
,
tsResolveFQDNRetryTime
,
pInfo
->
nodeId
,
pInfo
->
clusterId
,
pInfo
->
nodeFqdn
,
pInfo
->
nodePort
);
for
(
int
i
=
0
;
i
<
tsResolveFQDNRetryTime
;
i
++
){
ipv4
=
taosGetIpv4FromFqdn
(
pInfo
->
nodeFqdn
);
if
(
ipv4
==
0xFFFFFFFF
||
ipv4
==
1
)
{
sError
(
"failed to resolve ipv4 addr, fqdn:%s, wait one second"
,
pInfo
->
nodeFqdn
);
taosSsleep
(
1
);
}
else
{
break
;
}
}
if
(
ipv4
==
0xFFFFFFFF
||
ipv4
==
1
)
{
sError
(
"failed to resolve ipv4 addr, fqdn:%s"
,
pInfo
->
nodeFqdn
);
terrno
=
TSDB_CODE_TSC_INVALID_FQDN
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录