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: raft mode maintains the reload logic consistent with the file #7027

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

funky-eyes
Copy link
Contributor

@funky-eyes funky-eyes commented Nov 26, 2024

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

存在于file一样的缺点,reload后会删除failed状态的事务及涉及的分支事务和锁
以及reload时机于file有区别,file是在重启时,而raft是在leader选举后进行reload(一般leader重选举就是leader挂了)

It has the same drawbacks as in the file: after reload, failed transactions, associated branch transactions, and locks will be deleted. Additionally, the timing of the reload differs from that of the file; the file reload occurs during a restart, while the RAFT reload happens after a leader election (usually, the leader re-election occurs when the leader has failed).

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 52.60%. Comparing base (34990eb) to head (b4116c1).
Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...erver/storage/raft/session/RaftSessionManager.java 28.57% 9 Missing and 1 partial ⚠️
...org/apache/seata/server/session/SessionHolder.java 11.11% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #7027      +/-   ##
============================================
- Coverage     52.61%   52.60%   -0.02%     
- Complexity     6590     6596       +6     
============================================
  Files          1126     1126              
  Lines         40004    40020      +16     
  Branches       4696     4700       +4     
============================================
+ Hits          21050    21052       +2     
- Misses        16946    16963      +17     
+ Partials       2008     2005       -3     
Files with missing lines Coverage Δ
...erver/storage/file/session/FileSessionManager.java 56.60% <100.00%> (ø)
...org/apache/seata/server/session/SessionHolder.java 53.84% <11.11%> (-0.11%) ⬇️
...erver/storage/raft/session/RaftSessionManager.java 8.47% <28.57%> (+2.81%) ⬆️

... and 5 files with indirect coverage changes

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.

LGTM

@slievrly slievrly merged commit c34aa4e into apache:2.x Nov 27, 2024
7 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