Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: support ipv6 #5902

Merged
merged 9 commits into from
Oct 9, 2023
Merged

feature: support ipv6 #5902

merged 9 commits into from
Oct 9, 2023

Conversation

Ifdevil
Copy link
Contributor

@Ifdevil Ifdevil commented Oct 6, 2023

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

改造目标:使seata支持ipv6,增加server端和client端对ipv6地址校验及解析;

改造思路:seata使用的第三方库本身也对IPv6有支持,所以本次Seata对IPv6的支持改造主要是对IP地址的解析和校验.
1、对NetUtil工具类改造,增加ipv6校验和解析
2、discovery模块,修改服务发现解析ip:port的代码
3、ChannelManager#readClientId方法修改

Ⅱ. Does this pull request fix one issue?

fixes #5846
fixes #5607

Ⅲ. Why don't you add test cases (unit test/integration test)?

代码正确的话,补充缺少的测试单例和注释

Ⅳ. Describe how to verify it

将当前代码部署到ipv4和ipv6环境下,对各个事务模式进行业务案例测试,确保在ipv6及ipv4环境下,可以正常通信及事务功能

Ⅴ. Special notes for reviews

NetUtil#toLong方法没有看到调用,不确定是否需要修改,如需修改,请给点建议吧
有其他问题,我会及时修改的

@CLAassistant
Copy link

CLAassistant commented Oct 6, 2023

CLA assistant check
All committers have signed the CLA.

@Ifdevil Ifdevil changed the title support ipv6 feature:support ipv6 Oct 6, 2023
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #5902 (2c8a525) into 2.x (5c28eeb) will decrease coverage by 0.08%.
Report is 1 commits behind head on 2.x.
The diff coverage is 51.00%.

❗ Current head 2c8a525 differs from pull request most recent head 4ce4a4e. Consider uploading reports for the commit 4ce4a4e to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5902      +/-   ##
============================================
- Coverage     48.76%   48.69%   -0.08%     
- Complexity     4434     4445      +11     
============================================
  Files           819      820       +1     
  Lines         28610    28695      +85     
  Branches       3569     3591      +22     
============================================
+ Hits          13951    13972      +21     
- Misses        13197    13254      +57     
- Partials       1462     1469       +7     
Files Coverage Δ
...very/registry/zk/ZookeeperRegisterServiceImpl.java 61.31% <100.00%> (ø)
...eata/core/rpc/netty/NettyClientChannelManager.java 61.31% <0.00%> (ø)
...ta/discovery/registry/FileRegistryServiceImpl.java 0.00% <0.00%> (ø)
...covery/registry/etcd3/EtcdRegistryServiceImpl.java 11.36% <0.00%> (ø)
...n/java/io/seata/core/rpc/netty/ChannelManager.java 0.00% <0.00%> (ø)
.../io/seata/common/util/NetAddressValidatorUtil.java 65.71% <65.71%> (ø)
...on/src/main/java/io/seata/common/util/NetUtil.java 53.48% <50.94%> (-3.49%) ⬇️

... and 6 files with indirect coverage changes

@slievrly slievrly assigned slievrly and unassigned slievrly Oct 6, 2023
@slievrly slievrly self-requested a review October 6, 2023 15:55
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slievrly slievrly changed the title feature:support ipv6 feature: support ipv6 Oct 9, 2023
@slievrly slievrly added this to the 2.0.0 milestone Oct 9, 2023
@slievrly slievrly merged commit df32ebe into apache:2.x Oct 9, 2023
5 checks passed
@leizhiyuan leizhiyuan mentioned this pull request Oct 17, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants