Skip to content

Create RCP10 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions RCP10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
RCP 4 - Add "defaults" and "diff" sub-commands to config
===

```
Author: Bill Anderson <therealbill@me.com>
Creation date: 2016-01-27
Update date: 2016-01-27
Status: Open
Version: 1.0
Implementation:
```

History
---

* Version 1.0 (2016-01-27): Initial version.


Proposal
---
Add two new options to the config command. The first is to enable the user to
pull the default values for all of the configuration directives. The second is
for pulling all directive/value pairs which are *not* the default.


Rationale
---

Often when trying to help a user in the community, or to see what has been
modified when troubleshooting an instance dirctly, it is very useful to see
what has been altered or modified from the defaults. An example of a system
which uses this is Postfix' `postconf` command which has an option to only
display changes from default. A clear and valuable use for this would be in to
limit the data in a config dump used for posting to StackExchange, the mailing
list, Reddit, etc..

For the `config defaults` sub-command this is useful for tools which manage or
discover Redis instances. In combination with the `config diff` subcommand this
can be very useful for tracking default changes and values across versions.
This can be useful for users looking to upgrade their Redis version to detect
changes which may affect their setup. This command returns what the compiled in
defaults are - not what the current values are. Combining this with the `config
diff` command would allow administration tools to "reset" a value to the
default for that version of Redis, for example.


Commands introduced
---

New Config Subcommand:
`CONFIG DIFF`: Returns a list of config directives which are not the defaults.
Other than returning just the changed values it should behave and repsond like
a `CONFIG GET *` would.
`CONFIG GET DEFAULTS`: Returns all the *default* values for all config

Choose a reason for hiding this comment

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

  • CONFIG GETDEFAULT parameter could be a better alternative as it follows the idea behind CONFIG GET parameter IMHO
  • 👍 for CONFIG DIFF though

Copy link

Choose a reason for hiding this comment

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

CONFIG GETDEFAULT would allow for pattern matching, CONFIG GETDEFAULT * thus would be the same as CONFIG GET DEFAULTS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, good points, but I don't like munging words together, especially as it confuses people when explaining or walking them through something verbally. How about CONFIG DEFAULTS instead? Then we could still do CONFIG DEFAULTS <pattern> for matching.

directives - regardless of any changes made.


2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ List of RCPs

1. RCP1: [Multi user AUTH with ACLs.](https://github.com/redis/redis-rcp/blob/master/RCP1.md)
1. RCP3: [Lazy write operations](https://github.com/redis/redis-rcp/blob/master/RCP3.md)
1. RCP4: [Sentinel Flushconfig command](https://github.com/redis/redis-rcp/blob/master/RCP4.md)
1. RCP10: [Additional CONFIG Subcommands](https://github.com/redis/redis-rcp/blob/master/RCP10.md)