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

Initial cleanup for cluster refactoring #460

Merged
merged 1 commit into from May 15, 2024

Conversation

madolson
Copy link
Member

@madolson madolson commented May 7, 2024

Cleaned up the minor cluster refactoring notes that were intended to be follow ups that never happened. Basically:

  1. Minor style nitpicks
  2. Generalized clusterNodeIsMyself so that it wasn't implementation dependent.
  3. Removed getMyClusterId, and just make it an explicit call to myself's name, which seems more straightforward and removes unnecessary abstraction.
  4. Remove clusterNodeGetSlaveof infavor of clusterNodeGetMaster. We already do a check if it's a replica, and if it wasn't working it would have been crashing.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 68.88%. Comparing base (cde8ec1) to head (de545a9).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #460      +/-   ##
============================================
- Coverage     68.91%   68.88%   -0.03%     
============================================
  Files           109      109              
  Lines         61793    61789       -4     
============================================
- Hits          42582    42565      -17     
- Misses        19211    19224      +13     
Files Coverage Δ
src/cluster.c 83.03% <75.00%> (+0.29%) ⬆️
src/cluster_legacy.c 83.24% <0.00%> (+0.07%) ⬆️
src/module.c 9.34% <0.00%> (ø)

... and 14 files with indirect coverage changes

@madolson madolson requested a review from PingXie May 7, 2024 23:28
Copy link
Member

@PingXie PingXie left a comment

Choose a reason for hiding this comment

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

LGTM. As a side note, we should also start migrating to the "primary/replica" terminology for anything non-user facing.

@madolson madolson merged commit 546cef6 into valkey-io:unstable May 15, 2024
17 checks passed
hallmason17 pushed a commit to hallmason17/valkey that referenced this pull request May 15, 2024
Cleaned up the minor cluster refactoring notes that were intended to be
follow ups that never happened. Basically:
1. Minor style nitpicks
2. Generalized clusterNodeIsMyself so that it wasn't implementation
dependent.
3. Removed getMyClusterId, and just make it an explicit call to myself's
name, which seems more straightforward and removes unnecessary
abstraction.
4. Remove clusterNodeGetSlaveof infavor of clusterNodeGetMaster. We
already do a check if it's a replica, and if it wasn't working it would
have been crashing.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
hallmason17 pushed a commit to hallmason17/valkey that referenced this pull request May 18, 2024
Cleaned up the minor cluster refactoring notes that were intended to be
follow ups that never happened. Basically:
1. Minor style nitpicks
2. Generalized clusterNodeIsMyself so that it wasn't implementation
dependent.
3. Removed getMyClusterId, and just make it an explicit call to myself's
name, which seems more straightforward and removes unnecessary
abstraction.
4. Remove clusterNodeGetSlaveof infavor of clusterNodeGetMaster. We
already do a check if it's a replica, and if it wasn't working it would
have been crashing.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
srgsanky pushed a commit to srgsanky/valkey that referenced this pull request May 19, 2024
Cleaned up the minor cluster refactoring notes that were intended to be
follow ups that never happened. Basically:
1. Minor style nitpicks
2. Generalized clusterNodeIsMyself so that it wasn't implementation
dependent.
3. Removed getMyClusterId, and just make it an explicit call to myself's
name, which seems more straightforward and removes unnecessary
abstraction.
4. Remove clusterNodeGetSlaveof infavor of clusterNodeGetMaster. We
already do a check if it's a replica, and if it wasn't working it would
have been crashing.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
adetunjii pushed a commit to adetunjii/valkey that referenced this pull request May 22, 2024
Cleaned up the minor cluster refactoring notes that were intended to be
follow ups that never happened. Basically:
1. Minor style nitpicks
2. Generalized clusterNodeIsMyself so that it wasn't implementation
dependent.
3. Removed getMyClusterId, and just make it an explicit call to myself's
name, which seems more straightforward and removes unnecessary
abstraction.
4. Remove clusterNodeGetSlaveof infavor of clusterNodeGetMaster. We
already do a check if it's a replica, and if it wasn't working it would
have been crashing.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Samuel Adetunji <adetunjithomas1@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants