From c25c1f01dd23408e2489679833d07c751dca3410 Mon Sep 17 00:00:00 2001 From: Wen Hui Date: Wed, 10 Nov 2021 15:28:23 -0500 Subject: [PATCH 01/75] Add sentinel GET command --- src/sentinel.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/sentinel.c b/src/sentinel.c index 02cf931abf3..a77542632af 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -457,6 +457,7 @@ dictType renamedCommandsDictType = { /* =========================== Initialization =============================== */ void sentinelSetCommand(client *c); +void sentinelGetCommand(client *c); void sentinelConfigGetCommand(client *c); void sentinelConfigSetCommand(client *c); @@ -3942,6 +3943,9 @@ NULL } else if (!strcasecmp(c->argv[1]->ptr,"set")) { if (c->argc <= 3) goto numargserr; sentinelSetCommand(c); + } else if (!strcasecmp(c->argv[1]->ptr,"get")) { + if (c->argc != 3) goto numargserr; + sentinelGetCommand(c); } else if (!strcasecmp(c->argv[1]->ptr,"config")) { if (c->argc < 3) goto numargserr; if (!strcasecmp(c->argv[2]->ptr,"set") && c->argc == 5) @@ -4153,6 +4157,58 @@ void sentinelRoleCommand(client *c) { dictReleaseIterator(di); } +/* SENTINEL GET