-
Notifications
You must be signed in to change notification settings - Fork 20
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
therealbill
wants to merge
4
commits into
redis:master
Choose a base branch
from
therealbill:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Create RCP10 #17
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
directives - regardless of any changes made. | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 behindCONFIG GET parameter
IMHOCONFIG DIFF
thoughThere was a problem hiding this comment.
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 asCONFIG GET DEFAULTS
There was a problem hiding this comment.
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 doCONFIG DEFAULTS <pattern>
for matching.