-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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 node metadata sync #6326
Merged
Merged
Conversation
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6326 +/- ##
============================================
- Coverage 50.95% 50.86% -0.09%
- Complexity 5278 5282 +4
============================================
Files 937 941 +4
Lines 33129 33232 +103
Branches 4016 4029 +13
============================================
+ Hits 16881 16904 +23
- Misses 14579 14656 +77
- Partials 1669 1672 +3
|
funky-eyes
added
module/server
server module
type: feature
Category issues or prs related to feature request.
labels
Mar 1, 2024
ptyin
reviewed
Mar 4, 2024
server/src/main/java/org/apache/seata/server/cluster/raft/RaftStateMachine.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/seata/server/cluster/raft/sync/msg/dto/RaftClusterMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/seata/server/cluster/raft/RaftStateMachine.java
Show resolved
Hide resolved
ptyin
approved these changes
Mar 5, 2024
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Ⅰ. Describe what this PR did
增加集群间元数据同步能力
1.leader选举成功后,生成只包含它自身的元数据,该元数据为一个单例,并同步至follower
2.follower收到这个元数据后,发送自身的元数据至server侧,进行补充follower的元数据
3.leader收到后,在元数据的follower中增加该节点,并推送元数据变更至client和其它tc节点
并且元数据中增加version字段,用于后续比如存在新旧多版本server,leader可以在同步的时候使用所有节点都能支持的协议,以便向下兼容。
Increase the ability of inter-cluster metadata synchronization
And the version field is added to the metadata for subsequent use. For example, if there are old and new multi-version servers, the leader can use a protocol that all nodes can support during synchronization for backward compatibility.
Ⅱ. 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