Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@PeppaO
Copy link
Contributor

@PeppaO PeppaO commented Feb 10, 2025

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

在部署raft集群时,发现有的节点启动慢时间差会导致follwing同步失败,且initSync不会再次同步.
同步时机:

  1. 定时器syncMetadata,第一次同步失败initSync设置为true后,会导致同步元数据不会再次发起
  2. onFollowing同步,由于leader为null,同步元数据无法成功

以上导致该节点无法加入到raft集群中。
该pr主要是针对以上两个时机出现的异常情况进行设置,保证定时器syncMetadata还会进入同步逻辑。

Ⅱ. 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 10, 2025
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/server server module store: raft labels Feb 10, 2025
@codecov
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 51.79%. Comparing base (795f274) to head (a0cc162).
Report is 1 commits behind head on 2.x.

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

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #7150      +/-   ##
============================================
+ Coverage     51.78%   51.79%   +0.01%     
- Complexity     6755     6757       +2     
============================================
  Files          1151     1151              
  Lines         40970    40975       +5     
  Branches       4803     4803              
============================================
+ Hits          21215    21222       +7     
+ Misses        17760    17758       -2     
  Partials       1995     1995              
Files with missing lines Coverage Δ
...he/seata/server/cluster/raft/RaftStateMachine.java 14.41% <20.00%> (+0.12%) ⬆️

... and 2 files with indirect coverage changes

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

@funky-eyes funky-eyes merged commit 2055817 into apache:2.x Feb 10, 2025
8 checks passed
slievrly pushed a commit to slievrly/fescar that referenced this pull request Oct 21, 2025
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/server server module store: raft type: bug Category issues or prs related to bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants