From f36eac9f68308e712c3f10de11c05982df03b0c6 Mon Sep 17 00:00:00 2001 From: Wen Hui Date: Thu, 28 Apr 2022 01:13:04 -0400 Subject: [PATCH] Update the comments of commands introduced or updated in redis 7.0 (#10659) --- src/expire.c | 8 ++++---- src/functions.c | 3 +++ src/pubsub.c | 2 +- src/server.c | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/expire.c b/src/expire.c index f49e371b6..a6a40450e 100644 --- a/src/expire.c +++ b/src/expire.c @@ -662,22 +662,22 @@ void expireGenericCommand(client *c, long long basetime, int unit) { } } -/* EXPIRE key seconds */ +/* EXPIRE key seconds [ NX | XX | GT | LT] */ void expireCommand(client *c) { expireGenericCommand(c,mstime(),UNIT_SECONDS); } -/* EXPIREAT key time */ +/* EXPIREAT key unix-time-seconds [ NX | XX | GT | LT] */ void expireatCommand(client *c) { expireGenericCommand(c,0,UNIT_SECONDS); } -/* PEXPIRE key milliseconds */ +/* PEXPIRE key milliseconds [ NX | XX | GT | LT] */ void pexpireCommand(client *c) { expireGenericCommand(c,mstime(),UNIT_MILLISECONDS); } -/* PEXPIREAT key ms_time */ +/* PEXPIREAT key unix-time-milliseconds [ NX | XX | GT | LT] */ void pexpireatCommand(client *c) { expireGenericCommand(c,0,UNIT_MILLISECONDS); } diff --git a/src/functions.c b/src/functions.c index d327d3358..19d0d0c11 100644 --- a/src/functions.c +++ b/src/functions.c @@ -599,6 +599,7 @@ void functionDeleteCommand(client *c) { addReply(c, shared.ok); } +/* FUNCTION KILL */ void functionKillCommand(client *c) { scriptKill(c, 0); } @@ -778,6 +779,7 @@ load_error: } } +/* FUNCTION FLUSH [ASYNC | SYNC] */ void functionFlushCommand(client *c) { if (c->argc > 3) { addReplySubcommandSyntaxError(c); @@ -803,6 +805,7 @@ void functionFlushCommand(client *c) { addReply(c,shared.ok); } +/* FUNCTION HELP */ void functionHelpCommand(client *c) { const char *help[] = { "LOAD [REPLACE] [DESCRIPTION ] ", diff --git a/src/pubsub.c b/src/pubsub.c index a630afc8f..07459c1c8 100644 --- a/src/pubsub.c +++ b/src/pubsub.c @@ -708,7 +708,7 @@ void ssubscribeCommand(client *c) { } -/* SUNSUBSCRIBE [channel ...] */ +/* SUNSUBSCRIBE [channel [channel ...]] */ void sunsubscribeCommand(client *c) { if (c->argc == 1) { pubsubUnsubscribeShardAllChannels(c, 1); diff --git a/src/server.c b/src/server.c index 298834eab..5cc9aa507 100644 --- a/src/server.c +++ b/src/server.c @@ -4911,7 +4911,7 @@ void commandInfoCommand(client *c) { } } -/* COMMAND DOCS [ ...] */ +/* COMMAND DOCS [command-name [command-name ...]] */ void commandDocsCommand(client *c) { int i; if (c->argc == 2) {