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
{ {
"SWAPDB": { "SWAPDB": {
"summary": "Swaps two Redis databases", "summary": "Swaps two Redis databases.",
"complexity": "O(N) where N is the count of clients watching or blocking on keys from both databases.", "complexity": "O(N) where N is the count of clients watching or blocking on keys from both databases.",
"group": "server", "group": "server",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"SYNC": { "SYNC": {
"summary": "Internal command used for replication", "summary": "An internal command used in replication.",
"group": "server", "group": "server",
"since": "1.0.0", "since": "1.0.0",
"arity": 1, "arity": 1,
......
{ {
"TIME": { "TIME": {
"summary": "Return the current server time", "summary": "Returns the server time.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "server", "group": "server",
"since": "2.6.0", "since": "2.6.0",
......
{ {
"TOUCH": { "TOUCH": {
"summary": "Alters the last access time of a key(s). Returns the number of existing keys specified.", "summary": "Returns the number of existing keys out of those specified after updating the time they were last accessed.",
"complexity": "O(N) where N is the number of keys that will be touched.", "complexity": "O(N) where N is the number of keys that will be touched.",
"group": "generic", "group": "generic",
"since": "3.2.1", "since": "3.2.1",
......
{ {
"TTL": { "TTL": {
"summary": "Get the time to live for a key in seconds", "summary": "Returns the expiration time in seconds of a key.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "generic", "group": "generic",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"TYPE": { "TYPE": {
"summary": "Determine the type stored at key", "summary": "Determines the type of value stored at a key.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "generic", "group": "generic",
"since": "1.0.0", "since": "1.0.0",
......
{ {
"UNLINK": { "UNLINK": {
"summary": "Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.", "summary": "Asynchronously deletes one or more keys.",
"complexity": "O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.", "complexity": "O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.",
"group": "generic", "group": "generic",
"since": "4.0.0", "since": "4.0.0",
......
{ {
"UNSUBSCRIBE": { "UNSUBSCRIBE": {
"summary": "Stop listening for messages posted to the given channels", "summary": "Stops listening to messages posted to channels.",
"complexity": "O(N) where N is the number of clients already subscribed to a channel.", "complexity": "O(N) where N is the number of clients already subscribed to a channel.",
"group": "pubsub", "group": "pubsub",
"since": "2.0.0", "since": "2.0.0",
......
{ {
"UNWATCH": { "UNWATCH": {
"summary": "Forget about all watched keys", "summary": "Forgets about watched keys of a transaction.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "transactions", "group": "transactions",
"since": "2.2.0", "since": "2.2.0",
......
{ {
"WAIT": { "WAIT": {
"summary": "Wait for the synchronous replication of all the write commands sent in the context of the current connection", "summary": "Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "generic", "group": "generic",
"since": "3.0.0", "since": "3.0.0",
......
{ {
"WAITAOF": { "WAITAOF": {
"summary": "Wait for all write commands sent in the context of the current connection to be synced to AOF of local host and/or replicas", "summary": "Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the master and/or replicas.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "generic", "group": "generic",
"since": "7.2.0", "since": "7.2.0",
......
{ {
"WATCH": { "WATCH": {
"summary": "Watch the given keys to determine execution of the MULTI/EXEC block", "summary": "Monitors changes to keys to determine the execution of a transaction.",
"complexity": "O(1) for every key.", "complexity": "O(1) for every key.",
"group": "transactions", "group": "transactions",
"since": "2.2.0", "since": "2.2.0",
......
{ {
"XACK": { "XACK": {
"summary": "Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL.", "summary": "Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.",
"complexity": "O(1) for each message ID processed.", "complexity": "O(1) for each message ID processed.",
"group": "stream", "group": "stream",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"XADD": { "XADD": {
"summary": "Appends a new entry to a stream", "summary": "Appends a new message to a stream. Creates the key if it doesn't exist.",
"complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.", "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.",
"group": "stream", "group": "stream",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"XAUTOCLAIM": { "XAUTOCLAIM": {
"summary": "Changes (or acquires) ownership of messages in a consumer group, as if the messages were delivered to the specified consumer.", "summary": "Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.",
"complexity": "O(1) if COUNT is small.", "complexity": "O(1) if COUNT is small.",
"group": "stream", "group": "stream",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"XCLAIM": { "XCLAIM": {
"summary": "Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.", "summary": "Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.",
"complexity": "O(log N) with N being the number of messages in the PEL of the consumer group.", "complexity": "O(log N) with N being the number of messages in the PEL of the consumer group.",
"group": "stream", "group": "stream",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"XDEL": { "XDEL": {
"summary": "Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist.", "summary": "Returns the number of messages after removing them from a stream.",
"complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.", "complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.",
"group": "stream", "group": "stream",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"CREATE": { "CREATE": {
"summary": "Create a consumer group.", "summary": "Creates a consumer group.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "stream", "group": "stream",
"since": "5.0.0", "since": "5.0.0",
......
{ {
"CREATECONSUMER": { "CREATECONSUMER": {
"summary": "Create a consumer in a consumer group.", "summary": "Creates a consumer in a consumer group.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "stream", "group": "stream",
"since": "6.2.0", "since": "6.2.0",
......
{ {
"DELCONSUMER": { "DELCONSUMER": {
"summary": "Delete a consumer from a consumer group.", "summary": "Deletes a consumer from a consumer group.",
"complexity": "O(1)", "complexity": "O(1)",
"group": "stream", "group": "stream",
"since": "5.0.0", "since": "5.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