Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

feat: support resolving meta host through DNS #60

Merged
merged 14 commits into from
Oct 26, 2019

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Oct 21, 2019

该PR核心代码来源:pull#41

该PR提供对meta域名的解析,并兼容之前的url list格式。新增的域名支持格式如下:

tjwqtst-staging.pegasus.hadoop.srv:34601

该PR新增和修改的主要地方如下:
1、添加了HostNameResolver用于解析host
2、在MetaSession初始化过程添加了meta地址格式判断,以兼容url list格式
3、在onFinishQueryMeta中,增加了dns自动刷新逻辑:meta url为host格式下,当metalist中所有的地址失效后,强制刷新DNS
4、在MetaRequestRound中添加maxResolveCount,以支持在DNS刷新之后依然失败的情况,启动有限次的重试

注意:DNS解析依赖DNS域名系统支持,需在域名系统中注册不同集群对应的域名,并在后续变更中手动维护

@neverchanje neverchanje merged commit 59a4a15 into XiaoMi:thrift-0.11.0-inlined Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants