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

optimize: use the ip of the peerId as the host of the raft node #7182

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

PeppaO
Copy link
Contributor

@PeppaO PeppaO commented Feb 24, 2025

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

raft创建node时,采用peerId作为host,而不是xid的ip,因为当不设置SEATA_IP时,xid的ip为podIp,podIp会变动,这会导致在集群扩缩容时,节点只增不减,不是唯一的,而peerId的ip是一个svc域名

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes added this to the 2.4.0 milestone Feb 24, 2025
@PeppaO PeppaO changed the title optimize: Use the IP of the peerId as the host of the raft node optimize: use the ip of the peerId as the host of the raft node Feb 24, 2025
Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 52.08%. Comparing base (5c353cf) to head (a3dd5b9).
Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...he/seata/server/cluster/raft/RaftStateMachine.java 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #7182      +/-   ##
============================================
+ Coverage     52.07%   52.08%   +0.01%     
- Complexity     6854     6856       +2     
============================================
  Files          1169     1169              
  Lines         41461    41461              
  Branches       4850     4850              
============================================
+ Hits          21590    21595       +5     
+ Misses        17814    17811       -3     
+ Partials       2057     2055       -2     
Files with missing lines Coverage Δ
...he/seata/server/cluster/raft/RaftStateMachine.java 44.15% <50.00%> (ø)

... and 2 files with indirect coverage changes

@funky-eyes funky-eyes merged commit 4c7d1d9 into apache:2.x Feb 25, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants