This repository has been archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
feat: support resolving meta host through DNS #60
Merged
neverchanje
merged 14 commits into
XiaoMi:thrift-0.11.0-inlined
from
foreverneverer:dns
Oct 26, 2019
Merged
feat: support resolving meta host through DNS #60
neverchanje
merged 14 commits into
XiaoMi:thrift-0.11.0-inlined
from
foreverneverer:dns
Oct 26, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreverneverer
requested review from
neverchanje,
qinzuoyan,
acelyc111,
vagetablechicken,
hycdong and
levy5307
October 21, 2019 07:38
neverchanje
reviewed
Oct 22, 2019
src/main/java/com/xiaomi/infra/pegasus/rpc/async/HostNameResolver.java
Outdated
Show resolved
Hide resolved
src/main/java/com/xiaomi/infra/pegasus/rpc/async/HostNameResolver.java
Outdated
Show resolved
Hide resolved
src/main/java/com/xiaomi/infra/pegasus/rpc/async/MetaSession.java
Outdated
Show resolved
Hide resolved
src/test/java/com/xiaomi/infra/pegasus/rpc/async/MetaSessionTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/xiaomi/infra/pegasus/rpc/async/MetaSessionTest.java
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Oct 22, 2019
src/main/java/com/xiaomi/infra/pegasus/rpc/async/HostNameResolver.java
Outdated
Show resolved
Hide resolved
src/main/java/com/xiaomi/infra/pegasus/rpc/async/HostNameResolver.java
Outdated
Show resolved
Hide resolved
src/main/java/com/xiaomi/infra/pegasus/rpc/async/TableHandler.java
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Oct 22, 2019
acelyc111
reviewed
Oct 23, 2019
src/main/java/com/xiaomi/infra/pegasus/rpc/async/TableHandler.java
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Oct 24, 2019
src/main/java/com/xiaomi/infra/pegasus/rpc/async/MetaSession.java
Outdated
Show resolved
Hide resolved
src/main/java/com/xiaomi/infra/pegasus/rpc/async/TableHandler.java
Outdated
Show resolved
Hide resolved
src/test/java/com/xiaomi/infra/pegasus/rpc/async/MetaSessionTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/xiaomi/infra/pegasus/rpc/async/MetaSessionTest.java
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Oct 24, 2019
src/test/java/com/xiaomi/infra/pegasus/rpc/async/MetaSessionTest.java
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Oct 24, 2019
src/main/java/com/xiaomi/infra/pegasus/rpc/async/MetaSession.java
Outdated
Show resolved
Hide resolved
neverchanje
approved these changes
Oct 26, 2019
foreverneverer
added a commit
that referenced
this pull request
Oct 30, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
该PR核心代码来源:pull#41
该PR提供对meta域名的解析,并兼容之前的url list格式。新增的域名支持格式如下:
该PR新增和修改的主要地方如下:
1、添加了
HostNameResolver
用于解析host2、在
MetaSession
初始化过程添加了meta地址格式判断,以兼容url list格式3、在
onFinishQueryMeta
中,增加了dns自动刷新逻辑:meta url为host格式下,当metalist中所有的地址失效后,强制刷新DNS4、在
MetaRequestRound
中添加maxResolveCount
,以支持在DNS刷新之后依然失败的情况,启动有限次的重试注意:DNS解析依赖DNS域名系统支持,需在域名系统中注册不同集群对应的域名,并在后续变更中手动维护