serverLog(LL_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in keys eviction and/or inability to accept new write commands depending on the maxmemory-policy.");
serverLog(LL_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in key eviction and/or the inability to accept new write commands depending on the maxmemory-policy.");
"change-repl-id -- Change the replication IDs of the instance. Dangerous, should be used only for testing the replication subsystem.",
"CHANGE-REPL-ID -- Change the replication IDs of the instance. Dangerous, should be used only for testing the replication subsystem.",
"crash-and-recover <milliseconds> -- Hard crash and restart after <milliseconds> delay.",
"CRASH-AND-RECOVER <milliseconds> -- Hard crash and restart after <milliseconds> delay.",
"digest -- Outputs an hex signature representing the current DB content.",
"DIGEST -- Output a hex signature representing the current DB content.",
"htstats <dbid> -- Return hash table statistics of the specified Redis database.",
"DIGEST-VALUE <key-1> ... <key-N>-- Output a hex signature of the values of all the specified keys.",
"htstats-key <key> -- Like htstats but for the hash table stored as key's value.",
"ERROR <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors.",
"loadaof -- Flush the AOF buffers on disk and reload the AOF in memory.",
"LOG <message> -- write message to the server log.",
"lua-always-replicate-commands (0|1) -- Setting it to 1 makes Lua replication defaulting to replicating single commands, without the script having to enable effects replication.",
"HTSTATS <dbid> -- Return hash table statistics of the specified Redis database.",
"object <key> -- Show low level info about key and associated value.",
"HTSTATS-KEY <key> -- Like htstats but for the hash table stored as key's value.",
"panic -- Crash the server simulating a panic.",
"LOADAOF -- Flush the AOF buffers on disk and reload the AOF in memory.",
"populate <count> [prefix] [size] -- Create <count> string keys named key:<num>. If a prefix is specified is used instead of the 'key' prefix.",
"LUA-ALWAYS-REPLICATE-COMMANDS <0|1> -- Setting it to 1 makes Lua replication defaulting to replicating single commands, without the script having to enable effects replication.",
"reload -- Save the RDB on disk and reload it back in memory.",
"OBJECT <key> -- Show low level info about key and associated value.",
"restart -- Graceful restart: save config, db, restart.",
"PANIC -- Crash the server simulating a panic.",
"sdslen <key> -- Show low level SDS string info representing key and value.",
"POPULATE <count> [prefix] [size] -- Create <count> string keys named key:<num>. If a prefix is specified is used instead of the 'key' prefix.",
"segfault -- Crash the server with sigsegv.",
"RELOAD -- Save the RDB on disk and reload it back in memory.",
"set-active-expire (0|1) -- Setting it to 0 disables expiring keys in background when they are not accessed (otherwise the Redis behavior). Setting it to 1 reenables back the default.",
"RESTART -- Graceful restart: save config, db, restart.",
"sleep <seconds> -- Stop the server for <seconds>. Decimals allowed.",
"SDSLEN <key> -- Show low level SDS string info representing key and value.",
"structsize -- Return the size of different Redis core C structures.",
"SEGFAULT -- Crash the server with sigsegv.",
"ziplist <key> -- Show low level info about the ziplist encoding.",
"SET-ACTIVE-EXPIRE <0|1> -- Setting it to 0 disables expiring keys in background when they are not accessed (otherwise the Redis behavior). Setting it to 1 reenables back the default.",
"error <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors.",
"SLEEP <seconds> -- Stop the server for <seconds>. Decimals allowed.",
"STRUCTSIZE -- Return the size of different Redis core C structures.",
"ZIPLIST <key> -- Show low level info about the ziplist encoding.",
"STRINGMATCH-TEST -- Run a fuzz tester against the stringmatchlen() function.",
/* Attributes are not real replies, so a well formed reply should
* also have a normal reply type after the attribute. */
addReplyBulkCString(c,"Some real reply following the attribute");
}elseif(!strcasecmp(name,"push")){
addReplyPushLen(c,2);
addReplyBulkCString(c,"server-cpu-usage");
addReplyLongLong(c,42);
/* Push replies are not synchronous replies, so we emit also a
* normal reply in order for blocking clients just discarding the
* push reply, to actually consume the reply and continue. */
addReplyBulkCString(c,"Some real reply following the push reply");
}elseif(!strcasecmp(name,"true")){
addReplyBool(c,1);
}elseif(!strcasecmp(name,"false")){
addReplyBool(c,0);
}elseif(!strcasecmp(name,"verbatim")){
addReplyVerbatim(c,"This is a verbatim\nstring",25,"txt");
}else{
addReplyError(c,"Wrong protocol type name. Please use one of the following: string|integer|double|bignum|null|array|set|map|attrib|push|verbatim|true|false|state|err|bloberr");
"Unblock a client blocked in a blocking command from a different connection",
9,
"5.0.0"},
{"CLUSTER ADDSLOTS",
{"CLUSTER ADDSLOTS",
"slot [slot ...]",
"slot [slot ...]",
"Assign new hash slots to receiving node",
"Assign new hash slots to receiving node",
...
@@ -145,7 +155,7 @@ struct commandHelp {
...
@@ -145,7 +155,7 @@ struct commandHelp {
"3.0.0"},
"3.0.0"},
{"CLUSTER FAILOVER",
{"CLUSTER FAILOVER",
"[FORCE|TAKEOVER]",
"[FORCE|TAKEOVER]",
"Forces a slave to perform a manual failover of its master.",
"Forces a replica to perform a manual failover of its master.",
12,
12,
"3.0.0"},
"3.0.0"},
{"CLUSTER FORGET",
{"CLUSTER FORGET",
...
@@ -178,9 +188,14 @@ struct commandHelp {
...
@@ -178,9 +188,14 @@ struct commandHelp {
"Get Cluster config for the node",
"Get Cluster config for the node",
12,
12,
"3.0.0"},
"3.0.0"},
{"CLUSTER REPLICAS",
"node-id",
"List replica nodes of the specified master node",
12,
"5.0.0"},
{"CLUSTER REPLICATE",
{"CLUSTER REPLICATE",
"node-id",
"node-id",
"Reconfigure a node as a slave of the specified master node",
"Reconfigure a node as a replica of the specified master node",
12,
12,
"3.0.0"},
"3.0.0"},
{"CLUSTER RESET",
{"CLUSTER RESET",
...
@@ -205,7 +220,7 @@ struct commandHelp {
...
@@ -205,7 +220,7 @@ struct commandHelp {
"3.0.0"},
"3.0.0"},
{"CLUSTER SLAVES",
{"CLUSTER SLAVES",
"node-id",
"node-id",
"List slave nodes of the specified master node",
"List replica nodes of the specified master node",
12,
12,
"3.0.0"},
"3.0.0"},
{"CLUSTER SLOTS",
{"CLUSTER SLOTS",
...
@@ -690,12 +705,12 @@ struct commandHelp {
...
@@ -690,12 +705,12 @@ struct commandHelp {
"1.0.0"},
"1.0.0"},
{"READONLY",
{"READONLY",
"-",
"-",
"Enables read queries for a connection to a cluster slave node",
"Enables read queries for a connection to a cluster replica node",
12,
12,
"3.0.0"},
"3.0.0"},
{"READWRITE",
{"READWRITE",
"-",
"-",
"Disables read queries for a connection to a cluster slave node",
"Disables read queries for a connection to a cluster replica node",
12,
12,
"3.0.0"},
"3.0.0"},
{"RENAME",
{"RENAME",
...
@@ -708,6 +723,11 @@ struct commandHelp {
...
@@ -708,6 +723,11 @@ struct commandHelp {
"Rename a key, only if the new key does not exist",
"Rename a key, only if the new key does not exist",
0,
0,
"1.0.0"},
"1.0.0"},
{"REPLICAOF",
"host port",
"Make the server a replica of another instance, or promote it as master.",
9,
"5.0.0"},
{"RESTORE",
{"RESTORE",
"key ttl serialized-value [REPLACE]",
"key ttl serialized-value [REPLACE]",
"Create a key using the provided serialized value, previously obtained using DUMP.",
"Create a key using the provided serialized value, previously obtained using DUMP.",
...
@@ -845,7 +865,7 @@ struct commandHelp {
...
@@ -845,7 +865,7 @@ struct commandHelp {
"1.0.0"},
"1.0.0"},
{"SLAVEOF",
{"SLAVEOF",
"host port",
"host port",
"Make the server a slave of another instance, or promote it as master",
"Make the server a replica of another instance, or promote it as master. Deprecated starting with Redis 5. Use REPLICAOF instead.",
9,
9,
"1.0.0"},
"1.0.0"},
{"SLOWLOG",
{"SLOWLOG",
...
@@ -954,7 +974,7 @@ struct commandHelp {
...
@@ -954,7 +974,7 @@ struct commandHelp {
7,
7,
"2.2.0"},
"2.2.0"},
{"WAIT",
{"WAIT",
"numslaves timeout",
"numreplicas timeout",
"Wait for the synchronous replication of all the write commands sent in the context of the current connection",
"Wait for the synchronous replication of all the write commands sent in the context of the current connection",
0,
0,
"3.0.0"},
"3.0.0"},
...
@@ -963,11 +983,36 @@ struct commandHelp {
...
@@ -963,11 +983,36 @@ struct commandHelp {
"Watch the given keys to determine execution of the MULTI/EXEC block",
"Watch the given keys to determine execution of the MULTI/EXEC block",
7,
7,
"2.2.0"},
"2.2.0"},
{"XACK",
"key group ID [ID ...]",
"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.",
14,
"5.0.0"},
{"XADD",
{"XADD",
"key ID field string [field string ...]",
"key ID field string [field string ...]",
"Appends a new entry to a stream",
"Appends a new entry to a stream",
14,
14,
"5.0.0"},
"5.0.0"},
{"XCLAIM",
"key group consumer min-idle-time ID [ID ...] [IDLE ms] [TIME ms-unix-time] [RETRYCOUNT count] [force] [justid]",
"Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.",
14,
"5.0.0"},
{"XDEL",
"key ID [ID ...]",
"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.",
"Return information and entries from a stream conusmer group pending entries list, that are messages fetched but never acknowledged.",
"Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.",
14,
14,
"5.0.0"},
"5.0.0"},
{"XRANGE",
{"XRANGE",
...
@@ -998,6 +1043,11 @@ struct commandHelp {
...
@@ -998,6 +1043,11 @@ struct commandHelp {
"Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE",
"Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE",
14,
14,
"5.0.0"},
"5.0.0"},
{"XTRIM",
"key MAXLEN [~] count",
"Trims the stream to (approximately if '~' is passed) a certain size",
14,
"5.0.0"},
{"ZADD",
{"ZADD",
"key [NX|XX] [CH] [INCR] score member [score member ...]",
"key [NX|XX] [CH] [INCR] score member [score member ...]",
"Add one or more members to a sorted set, or update its score if it already exists",
"Add one or more members to a sorted set, or update its score if it already exists",