I propose we officially deprecate QUIT and advise clients to drop connections when necessary and not use it. I assume most of the clients do that already, anyway. Terminating a connection on the client side is preferable, as it eliminates TIME_WAIT lingering sockets.
@redis/core-team Any thoughts?
Comment From: oranagra
Can you share some background on this realization? We just promoted it to a command (listed in COMMAND and handled by ACL) a few months ago... I see no problem to mark it as deprecated next version, and mention in the redis.io docs right away that it should be avoided, but I feel it's not gonna make any difference.
Comment From: yossigo
Background: some discussions with users who believe it's cleaner to use QUIT rather than simply terminate the connection. I don't think the promotion to a first class is conflicting, after all we can't mark it obsolete if it isn't one.
Comment From: madolson
I honestly don't think the effort of introducing a backwards breaking change really justifies changing it. I think we need a more substantive reason to introduce the breaking change. The issue that Yossi mentioned is really just a documentation issue.
One argument I can think to keep it, is that for interactive terminals it reserves a keyword for actually quitting out.
Comment From: QuChen88
Personally speaking, I am in the habit of exiting redis-cli session via issuing the QUIT command. I think it is certainly handy to have. Don't see a reason to deprecate it.
Comment From: oranagra
IIRC until recently the QUIT "command" was handled locally in redis-cli (not sending a QUIT command to the server). anyway, redis-cli usability won't change if we remove that command. and also, as far as i understand, we're not discussing it's removal, just to mark it as deprecated and advise not to use it.
Comment From: enjoy-binbin
yes, in redis-cli, quit is handled locally, it just do the exit(0), doesn't issue the QUIT command. a ref: https://github.com/redis/redis/pull/10383
Comment From: yossigo
I did not intend to introduce a breaking change, only to document and make sure we drive clients to do the right thing. Luckily, redis-cli already sets a good example.
Comment From: QuChen88
Makes sense.
If we are not introducing a breaking change for clients then that is fine. I know some clients explicitly sends QUIT commands upon disconnection today.