Unverified Commit 0c3b8b7e authored by Itamar Haber's avatar Itamar Haber Committed by GitHub
Browse files

Overhauls command summaries and man pages. (#11942)

This is an attempt to normalize/formalize command summaries.

Main actions performed:

* Starts with the continuation of the phrase "The XXXX command, when called, ..." for user commands.
* Starts with "An internal command...", "A container command...", etc... when applicable.
* Always uses periods.
* Refrains from referring to other commands. If this is needed, backquotes should be used for command names.
* Tries to be very clear about the data type when applicable.
* Tries to mention additional effects, e.g. "The key is created if it doesn't exist" and "The set is deleted if the last member is removed."
* Prefers being terse over verbose.
* Tries to be consistent.
parent cb171786
{ {
"MYID": { "MYID": {
"summary": "Get the Sentinel instance ID", "summary": "Returns the Redis Sentinel instance ID.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "sentinel", "group": "sentinel",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"PENDING-SCRIPTS": { "PENDING-SCRIPTS": {
"summary": "Get information about pending scripts", "summary": "Returns information about pending scripts for Redis Sentinel.",
"group": "sentinel", "group": "sentinel",
"since": "2.8.4", "since": "2.8.4",
"arity": 2, "arity": 2,
......
{ {
"REMOVE": { "REMOVE": {
"summary": "Stop monitoring", "summary": "Stops monitoring.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "sentinel", "group": "sentinel",
"since": "2.8.4", "since": "2.8.4",
......
{ {
"REPLICAS": { "REPLICAS": {
"summary": "List the monitored replicas", "summary": "Returns a list of the monitored Redis replicas.",
"complexity": "O(N) where N is the number of replicas", "complexity": "O(N) where N is the number of replicas",
"group": "sentinel", "group": "sentinel",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"RESET": { "RESET": {
"summary": "Reset masters by name pattern", "summary": "Resets Redis masters by name matching a pattern.",
"complexity": "O(N) where N is the number of monitored masters", "complexity": "O(N) where N is the number of monitored masters",
"group": "sentinel", "group": "sentinel",
"since": "2.8.4", "since": "2.8.4",
......
{ {
"SENTINELS": { "SENTINELS": {
"summary": "List the Sentinel instances", "summary": "Returns a list of Sentinel instances.",
"complexity": "O(N) where N is the number of Sentinels", "complexity": "O(N) where N is the number of Sentinels",
"group": "sentinel", "group": "sentinel",
"since": "2.8.4", "since": "2.8.4",
......
{ {
"SET": { "SET": {
"summary": "Change the configuration of a monitored master", "summary": "Changes the configuration of a monitored Redis master.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "sentinel", "group": "sentinel",
"since": "2.8.4", "since": "2.8.4",
......
{ {
"SIMULATE-FAILURE": { "SIMULATE-FAILURE": {
"summary": "Simulate failover scenarios", "summary": "Simulates failover scenarios.",
"group": "sentinel", "group": "sentinel",
"since": "3.2.0", "since": "3.2.0",
"arity": -3, "arity": -3,
......
{ {
"SLAVES": { "SLAVES": {
"summary": "List the monitored slaves", "summary": "Returns a list of the monitored replicas.",
"complexity": "O(N) where N is the number of slaves", "complexity": "O(N) where N is the number of replicas.",
"group": "sentinel", "group": "sentinel",
"since": "2.8.0", "since": "2.8.0",
"arity": 3, "arity": 3,
......
{ {
"SENTINEL": { "SENTINEL": {
"summary": "A container for Sentinel commands", "summary": "A container for Redis Sentinel commands.",
"complexity": "Depends on subcommand.", "complexity": "Depends on subcommand.",
"group": "sentinel", "group": "sentinel",
"since": "2.8.4", "since": "2.8.4",
......
{ {
"SET": { "SET": {
"summary": "Set the string value of a key", "summary": "Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "string", "group": "string",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SETBIT": { "SETBIT": {
"summary": "Sets or clears the bit at offset in the string value stored at key", "summary": "Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "bitmap", "group": "bitmap",
"since": "2.2.0", "since": "2.2.0",
......
{ {
"SETEX": { "SETEX": {
"summary": "Set the value and expiration of a key", "summary": "Sets the string value and expiration time of a key. Creates the key if it doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "string", "group": "string",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"SETNX": { "SETNX": {
"summary": "Set the value of a key, only if the key does not exist", "summary": "Set the string value of a key only when the key doesn't exist.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "string", "group": "string",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SETRANGE": { "SETRANGE": {
"summary": "Overwrite part of a string at key starting at the specified offset", "summary": "Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist.",
"complexity": "O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.", "complexity": "O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.",
"group": "string", "group": "string",
"since": "2.2.0", "since": "2.2.0",
......
{ {
"SHUTDOWN": { "SHUTDOWN": {
"summary": "Synchronously save the dataset to disk and then shut down the server", "summary": "Synchronously saves the database(s) to disk and shuts down the Redis server.",
"complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)", "complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)",
"group": "server", "group": "server",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SINTER": { "SINTER": {
"summary": "Intersect multiple sets", "summary": "Returns the intersect of multiple sets.",
"complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.",
"group": "set", "group": "set",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SINTERCARD": { "SINTERCARD": {
"summary": "Intersect multiple sets and return the cardinality of the result", "summary": "Returns the number of members of the intersect of multiple sets.",
"complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.",
"group": "set", "group": "set",
"since": "7.0.0", "since": "7.0.0",
......
{ {
"SINTERSTORE": { "SINTERSTORE": {
"summary": "Intersect multiple sets and store the resulting set in a key", "summary": "Stores the intersect of multiple sets in a key.",
"complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.",
"group": "set", "group": "set",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"SISMEMBER": { "SISMEMBER": {
"summary": "Determine if a given value is a member of a set", "summary": "Determines whether a member belongs to a set.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "set", "group": "set",
"since": "1.0.0", "since": "1.0.0",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment