-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[ISSUE #12189] Refactor Client SDK. #12432
Closed
Closed
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5ced724
register
XiaZhouxx 1ed3f73
[ISSUE #12189]Client Refactor.
XiaZhouxx b0ea4df
优化client逻辑
XiaZhouxx bc13cc7
Merge remote-tracking branch 'origin/develop' into develop
XiaZhouxx d9be6af
client server list refactor.
XiaZhouxx 0b7e4be
优化并剔除冲突
XiaZhouxx aa4bab2
优化并剔除冲突
XiaZhouxx ae4bcb9
保留重构前指标
XiaZhouxx bd3a2cf
保留重构前指标
XiaZhouxx ff1411f
format code style.
XiaZhouxx bc4f936
保留 ClientWorker 指标逻辑.
XiaZhouxx 5ddaf34
format code style.
XiaZhouxx b5d68b2
修复测试用例问题.
XiaZhouxx 747f673
修复测试用例以及代码缩进.
XiaZhouxx d9f5e2e
add license.
XiaZhouxx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
27 changes: 0 additions & 27 deletions
27
client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListChangeEvent.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个逻辑是配置中心为了保持一个访问同一只可访问的server而保持的逻辑, 我看你下面的acquireNextServer并没有保留这个逻辑,但是又移除了, 可能有点问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是复用Naming模块的nextServer逻辑基于currentIndex, 在失败重试获取的逻辑里面会递增index, 应该不会导致Server下次访问会变动?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
配置和服务的一致性协议有所区别, 配置中心应该是尽可能保证访问到同一个节点上,注册中心可以随机分配。
因此这个逻辑之前时放在agent里和proxy里,没有放在地址服务器里。
既然这次是重构地址服务器,就不要改动外层agent和proxy的逻辑。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的, 这里在重试
genNextServer()
找到可用Server后下标固定还是这个Server, 所以移除了updateCurrentServerAddr()
, 注册中心则还是沿用以前的逻辑在构建时随机指定了一个下标。