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

Update redis keyword to valkey in some sentinel functions (Redis Legacy) #706

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

hwware
Copy link
Member

@hwware hwware commented Jun 27, 2024

This PR updates all Redis/redis keywords to Valkey/valkey, including variable names, comments, function names.

All sentinel test cases passed.

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 160 lines in your changes missing coverage. Please review.

Project coverage is 70.08%. Comparing base (6bf1d02) to head (d1e9cc2).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #706      +/-   ##
============================================
- Coverage     70.28%   70.08%   -0.20%     
============================================
  Files           111      111              
  Lines         60299    60299              
============================================
- Hits          42381    42262     -119     
- Misses        17918    18037     +119     
Files Coverage Δ
src/sentinel.c 0.00% <0.00%> (ø)

... and 14 files with indirect coverage changes

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.

Nice! LGTM

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

LGTM

I see some more occurrences of redis that can be changed, but that can be done in another PR if you want.

src/sentinel.c Outdated
int quorum,
sentinelRedisInstance *primary) {
sentinelRedisInstance *ri;
sentinelValkeyInstance *createSentinelRedisInstance(char *name,
Copy link
Contributor

Choose a reason for hiding this comment

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

Function name is still createSentinelRedisInstance. Change this too?

src/sentinel.c Outdated
@@ -1350,7 +1349,7 @@ sentinelRedisInstance *createSentinelRedisInstance(char *name,
* This function does not take care of unlinking the instance from the main
* primaries table (if it is a primary) or from its primary sentinels/replicas table
* if it is a replica or sentinel. */
void releaseSentinelRedisInstance(sentinelRedisInstance *ri) {
void releaseSentinelRedisInstance(sentinelValkeyInstance *ri) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Function name still contains redis.

src/sentinel.c Outdated
@@ -1448,10 +1447,10 @@ int removeMatchingSentinelFromPrimary(sentinelRedisInstance *primary, char *runi
*
* runid or addr can be NULL. In such a case the search is performed only
* by the non-NULL field. */
sentinelRedisInstance *getSentinelRedisInstanceByAddrAndRunID(dict *instances, char *addr, int port, char *runid) {
sentinelValkeyInstance *getSentinelRedisInstanceByAddrAndRunID(dict *instances, char *addr, int port, char *runid) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Function name contains redis.

Copy link
Member

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

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

https://github.com/valkey-io/valkey/blob/5925cc7c4fdd89e9547fa2602d5e46213c70f891/src/sentinel.c

i see there are still some places are using the Redis word, can you do a search and also fix it? like addReplySentinelRedisInstance

@hwware hwware force-pushed the update-redis-in-sentinel branch 3 times, most recently from b9ae8bb to f9b9713 Compare July 4, 2024 15:22
Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Thanks! Just one issue I wonder if clang-format doesn't understand.

src/sentinel.c Outdated Show resolved Hide resolved
@hwware hwware force-pushed the update-redis-in-sentinel branch from f9b9713 to d1e9cc2 Compare July 4, 2024 15:41
@hwware hwware merged commit 1680378 into valkey-io:unstable Jul 4, 2024
19 checks passed
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.

4 participants