Move clusterDelNode and clusterRenameNode to cluster_state.c#3542
Draft
zuiderkwast wants to merge 1 commit intovalkey-io:cluster-v2from
Draft
Move clusterDelNode and clusterRenameNode to cluster_state.c#3542zuiderkwast wants to merge 1 commit intovalkey-io:cluster-v2from
zuiderkwast wants to merge 1 commit intovalkey-io:cluster-v2from
Conversation
clusterDelNode was defined in cluster_legacy.c but declared in the shared cluster_state.h header, making it callable from any protocol implementation despite containing gossip-specific logic (failure report removal via rax iteration). Extract the gossip-specific cleanup into a cleanupNode callback on the bus vtable. Move the common parts (slot cleanup, shard removal, freeClusterNode) and clusterRenameNode to cluster_state.c where they belong as protocol-independent operations. Co-authored-by: Jacob Murphy <jkmurphy@google.com> Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2f97fa1 to
36cfd44
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## cluster-v2 #3542 +/- ##
==============================================
- Coverage 76.59% 76.53% -0.07%
==============================================
Files 160 160
Lines 79288 79292 +4
==============================================
- Hits 60733 60688 -45
- Misses 18555 18604 +49
🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
clusterDelNode was defined in cluster_legacy.c but declared in the shared cluster_state.h header, making it callable from any protocol implementation despite containing gossip-specific logic (failure report removal via rax iteration).
Extract the gossip-specific cleanup into a cleanupNode callback on the bus vtable. Move the common parts (slot cleanup, shard removal, freeClusterNode) and clusterRenameNode to cluster_state.c where they belong as protocol-independent operations.
This code was written by @murphyjacob4 and is part of #3532. The code was extracted from the PR as-is, so it shouldn't get any merge conflicts. (I removed a stale comment and a stale forward declaration though.)