Skip to content

Add RESET command.#7982

Merged
yossigo merged 4 commits into
redis:unstablefrom
yossigo:reset-command
Nov 5, 2020
Merged

Add RESET command.#7982
yossigo merged 4 commits into
redis:unstablefrom
yossigo:reset-command

Conversation

@yossigo

@yossigo yossigo commented Oct 28, 2020

Copy link
Copy Markdown
Collaborator

Perform full reset of all client connection states, is if the client was
disconnected and re-connected. This affects:

  • MULTI state
  • Watched keys
  • MONITOR mode
  • Pub/Sub subscription
  • ACL/Authenticated state
  • Client tracking state
  • Cluster read-only/asking state
  • RESP version
  • Selected database
  • CLIENT REPLY state

The response is +RESET to make it easily distinguishable from other
responses.

Resolves #5571

Perform full reset of all client connection states, is if the client was
disconnected and re-connected. This affects:

* MULTI state
* Watched keys
* MONITOR mode
* Pub/Sub subscription
* ACL/Authenticated state
* Client tracking state

The response is +RESET to make it easily distinguishable from other
responses.
Comment thread src/server.c
c->cmd->proc != execCommand && c->cmd->proc != discardCommand &&
c->cmd->proc != multiCommand && c->cmd->proc != watchCommand)
c->cmd->proc != multiCommand && c->cmd->proc != watchCommand &&
c->cmd->proc != resetCommand)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this

Comment thread src/networking.c

@oranagra oranagra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/server.c Outdated
@oranagra oranagra added state:major-decision Requires core team consensus state:needs-doc-pr requires a PR to redis-doc repository release-notes indication that this issue needs to be mentioned in the release notes labels Nov 1, 2020
Co-authored-by: Oran Agra <oran@redislabs.com>
oranagra
oranagra previously approved these changes Nov 1, 2020

@itamarhaber itamarhaber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also review redis/redis-doc#1426

Comment thread src/networking.c Outdated
Comment thread src/server.c Outdated
@itamarhaber

Copy link
Copy Markdown
Member

Also, worth mentioning in the top comment what it does to RESP, dbnum, and client reply perhaps.

Co-authored-by: Itamar Haber <itamar@redislabs.com>
@yossigo yossigo merged commit 1fd456f into redis:unstable Nov 5, 2020
@yossigo yossigo deleted the reset-command branch November 5, 2020 08:51
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 19, 2020
Perform full reset of all client connection states, is if the client was
disconnected and re-connected. This affects:

* MULTI state
* Watched keys
* MONITOR mode
* Pub/Sub subscription
* ACL/Authenticated state
* Client tracking state
* Cluster read-only/asking state
* RESP version (reset to 2)
* Selected database
* CLIENT REPLY state

The response is +RESET to make it easily distinguishable from other
responses.

Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: Itamar Haber <itamar@redislabs.com>
@oranagra oranagra mentioned this pull request Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus state:needs-doc-pr requires a PR to redis-doc repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a RESET command for reseting client state ?

4 participants