summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViktor Söderqvist <viktor.soderqvist@est.tech>2022-11-09 13:41:00 +0100
committerGitHub <noreply@github.com>2022-11-09 14:41:00 +0200
commit07d187066a86a9a3124af740373bf5bf49e345ff (patch)
treed58366eb0dbfaf4eb9ea30d022e4fb519ae9e27f /src
parentccaef5c923a14dc183c50530f52ada0fda012179 (diff)
downloadredis-07d187066a86a9a3124af740373bf5bf49e345ff.tar.gz
Deprecate QUIT (#11439)
Clients should not use this command. Instead, clients should simply close the connection when they're not used anymore. Terminating a connection on the client side is preferable, as it eliminates `TIME_WAIT` lingering sockets on the server side.
Diffstat (limited to 'src')
-rw-r--r--src/commands.c2
-rw-r--r--src/commands/quit.json5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/commands.c b/src/commands.c
index 38e73f682..caf7bda89 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -7164,7 +7164,7 @@ struct redisCommand redisCommandTable[] = {
{"echo","Echo the given string","O(1)","1.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CONNECTION,ECHO_History,ECHO_tips,echoCommand,2,CMD_LOADING|CMD_STALE|CMD_FAST,ACL_CATEGORY_CONNECTION,.args=ECHO_Args},
{"hello","Handshake with Redis","O(1)","6.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CONNECTION,HELLO_History,HELLO_tips,helloCommand,-1,CMD_NOSCRIPT|CMD_LOADING|CMD_STALE|CMD_FAST|CMD_NO_AUTH|CMD_SENTINEL|CMD_ALLOW_BUSY,ACL_CATEGORY_CONNECTION,.args=HELLO_Args},
{"ping","Ping the server","O(1)","1.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CONNECTION,PING_History,PING_tips,pingCommand,-1,CMD_FAST|CMD_SENTINEL,ACL_CATEGORY_CONNECTION,.args=PING_Args},
-{"quit","Close the connection","O(1)","1.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CONNECTION,QUIT_History,QUIT_tips,quitCommand,-1,CMD_ALLOW_BUSY|CMD_NOSCRIPT|CMD_LOADING|CMD_STALE|CMD_FAST|CMD_NO_AUTH,ACL_CATEGORY_CONNECTION},
+{"quit","Close the connection","O(1)","1.0.0",CMD_DOC_DEPRECATED,"just closing the connection","7.2.0",COMMAND_GROUP_CONNECTION,QUIT_History,QUIT_tips,quitCommand,-1,CMD_ALLOW_BUSY|CMD_NOSCRIPT|CMD_LOADING|CMD_STALE|CMD_FAST|CMD_NO_AUTH,ACL_CATEGORY_CONNECTION},
{"reset","Reset the connection","O(1)","6.2.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CONNECTION,RESET_History,RESET_tips,resetCommand,1,CMD_NOSCRIPT|CMD_LOADING|CMD_STALE|CMD_FAST|CMD_NO_AUTH|CMD_ALLOW_BUSY,ACL_CATEGORY_CONNECTION},
{"select","Change the selected database for the current connection","O(1)","1.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CONNECTION,SELECT_History,SELECT_tips,selectCommand,2,CMD_LOADING|CMD_STALE|CMD_FAST,ACL_CATEGORY_CONNECTION,.args=SELECT_Args},
/* generic */
diff --git a/src/commands/quit.json b/src/commands/quit.json
index cf13f1ee9..cdb80336d 100644
--- a/src/commands/quit.json
+++ b/src/commands/quit.json
@@ -6,6 +6,11 @@
"since": "1.0.0",
"arity": -1,
"function": "quitCommand",
+ "deprecated_since": "7.2.0",
+ "replaced_by": "just closing the connection",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
"command_flags": [
"ALLOW_BUSY",
"NOSCRIPT",