Skip to content

Commit

Permalink
Make valkey compatible with redis-sentinel to start sentinel (valkey-…
Browse files Browse the repository at this point in the history
…io#731)

We already have similar changes to check-rdb / check-aof, apply
this change to sentinel.

Fixes valkey-io#719.

Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: Ping Xie <pingxie@google.com>
  • Loading branch information
enjoy-binbin authored and PingXie committed Jul 9, 2024
1 parent fd40045 commit dcd1dcd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6765,6 +6765,9 @@ void memtest(size_t megabytes, int passes);
int checkForSentinelMode(int argc, char **argv, char *exec_name) {
if (strstr(exec_name,"valkey-sentinel") != NULL) return 1;

/* valkey may install symlinks like redis-sentinel -> valkey-sentinel. */
if (strstr(exec_name, "redis-sentinel") != NULL) return 1;

for (int j = 1; j < argc; j++)
if (!strcmp(argv[j],"--sentinel")) return 1;
return 0;
Expand Down

0 comments on commit dcd1dcd

Please sign in to comment.