diff options
author | Binbin <binloveplay1314@qq.com> | 2022-03-30 14:39:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 09:39:26 +0300 |
commit | e2fa6aa1589ef88322d16872bd6a94cdd21f353f (patch) | |
tree | e4d327d786468e8147f9ea2a60f6970eff5bed2b | |
parent | 16d206ee3600dba0b28535cc88f647afc80abbcc (diff) | |
download | redis-e2fa6aa1589ef88322d16872bd6a94cdd21f353f.tar.gz |
command json files cleanups (#10473)
This PR do some command json files cleanups:
1. Add COMMAND TIPS to some commands
- command-docs: add `NONDETERMINISTIC_OUTPUT_ORDER`
- command-info: add `NONDETERMINISTIC_OUTPUT_ORDER`
- command-list: add `NONDETERMINISTIC_OUTPUT_ORDER`
- command: change `NONDETERMINISTIC_OUTPUT` to `NONDETERMINISTIC_OUTPUT_ORDER`
- function-list: add `NONDETERMINISTIC_OUTPUT_ORDER`
- latency-doctor: add `NONDETERMINISTIC_OUTPUT`, `REQUEST_POLICY:ALL_NODES` and `RESPONSE_POLICY:SPECIAL`
- latency-graph: add `NONDETERMINISTIC_OUTPUT`, `REQUEST_POLICY:ALL_NODES` and `RESPONSE_POLICY:SPECIAL`
- memory-doctor: add `REQUEST_POLICY:ALL_SHARDS` and `RESPONSE_POLICY:SPECIAL`
- memory-malloc-stats: add `REQUEST_POLICY:ALL_SHARDS` and `RESPONSE_POLICY:SPECIAL`
- memory-purge: add `REQUEST_POLICY:ALL_SHARDS` and `RESPONSE_POLICY:ALL_SUCCEEDED`
- module-list: add `NONDETERMINISTIC_OUTPUT_ORDER`
- msetnx: add `REQUEST_POLICY:MULTI_SHARD` and `RESPONSE_POLICY:AGG_MIN`
- object-refcount: add `NONDETERMINISTIC_OUTPUT`
3. Only (mostly) indentation and formatting changes:
- cluster-shards
- latency-history
- pubsub-shardchannels
- pubsub-shardnumsub
- spublish
- ssubscribe
- sunsubscribe
4. add doc_flags (DEPRECATED) to cluster-slots, replaced_by `CLUSTER SHARDS` in 7.0
5. command-getkeysandflags: a better summary (the old one is copy from command-getkeys)
6. adjustment of command parameter types
- `port` is integer, not string (`MIGRATE`, `REPLICAOF`, `SLAVEOF`)
- `replicationid` is string, not integer (`PSYNC`)
- `pattern` is pattern, not string (`PUBSUB CHANNELS`, `SENTINEL RESET`, `SORT`, `SORT_RO`)
32 files changed, 301 insertions, 218 deletions
diff --git a/src/commands.c b/src/commands.c index c96b0782e..d7a62a71c 100644 --- a/src/commands.c +++ b/src/commands.c @@ -673,7 +673,7 @@ struct redisCommand CLUSTER_Subcommands[] = { {"setslot","Bind a hash slot to a specific node","O(1)","3.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CLUSTER,CLUSTER_SETSLOT_History,CLUSTER_SETSLOT_tips,clusterCommand,-4,CMD_NO_ASYNC_LOADING|CMD_ADMIN|CMD_STALE,0,.args=CLUSTER_SETSLOT_Args}, {"shards","Get array of cluster slots to node mappings","O(N) where N is the total number of cluster nodes","7.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_CLUSTER,CLUSTER_SHARDS_History,CLUSTER_SHARDS_tips,clusterCommand,2,CMD_STALE,0}, {"slaves","List replica nodes of the specified master node","O(1)","3.0.0",CMD_DOC_DEPRECATED,"`CLUSTER REPLICAS`","5.0.0",COMMAND_GROUP_CLUSTER,CLUSTER_SLAVES_History,CLUSTER_SLAVES_tips,clusterCommand,3,CMD_ADMIN|CMD_STALE,0,.args=CLUSTER_SLAVES_Args}, -{"slots","Get array of Cluster slot to node mappings","O(N) where N is the total number of Cluster nodes","3.0.0",CMD_DOC_NONE,"`CLUSTER SHARDS`","7.0.0",COMMAND_GROUP_CLUSTER,CLUSTER_SLOTS_History,CLUSTER_SLOTS_tips,clusterCommand,2,CMD_STALE,0}, +{"slots","Get array of Cluster slot to node mappings","O(N) where N is the total number of Cluster nodes","3.0.0",CMD_DOC_DEPRECATED,"`CLUSTER SHARDS`","7.0.0",COMMAND_GROUP_CLUSTER,CLUSTER_SLOTS_History,CLUSTER_SLOTS_tips,clusterCommand,2,CMD_STALE,0}, {0} }; @@ -1324,7 +1324,7 @@ struct redisCommandArg MIGRATE_username_password_Subargs[] = { /* MIGRATE argument table */ struct redisCommandArg MIGRATE_Args[] = { {"host",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, -{"port",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, +{"port",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {"key_or_empty_string",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=MIGRATE_key_or_empty_string_Subargs}, {"destination-db",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {"timeout",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, @@ -1416,7 +1416,10 @@ struct redisCommandArg OBJECT_IDLETIME_Args[] = { #define OBJECT_REFCOUNT_History NULL /* OBJECT REFCOUNT tips */ -#define OBJECT_REFCOUNT_tips NULL +const char *OBJECT_REFCOUNT_tips[] = { +"nondeterministic_output", +NULL +}; /* OBJECT REFCOUNT argument table */ struct redisCommandArg OBJECT_REFCOUNT_Args[] = { @@ -1670,7 +1673,7 @@ struct redisCommandArg SORT_Args[] = { {"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE}, {"pattern",ARG_TYPE_PATTERN,1,"BY",NULL,NULL,CMD_ARG_OPTIONAL}, {"offset_count",ARG_TYPE_BLOCK,-1,"LIMIT",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=SORT_offset_count_Subargs}, -{"pattern",ARG_TYPE_STRING,1,"GET",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE|CMD_ARG_MULTIPLE_TOKEN}, +{"pattern",ARG_TYPE_PATTERN,1,"GET",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE|CMD_ARG_MULTIPLE_TOKEN}, {"order",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=SORT_order_Subargs}, {"sorting",ARG_TYPE_PURE_TOKEN,-1,"ALPHA",NULL,NULL,CMD_ARG_OPTIONAL}, {"destination",ARG_TYPE_KEY,2,"STORE",NULL,NULL,CMD_ARG_OPTIONAL}, @@ -1704,7 +1707,7 @@ struct redisCommandArg SORT_RO_Args[] = { {"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE}, {"pattern",ARG_TYPE_PATTERN,1,"BY",NULL,NULL,CMD_ARG_OPTIONAL}, {"offset_count",ARG_TYPE_BLOCK,-1,"LIMIT",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=SORT_RO_offset_count_Subargs}, -{"pattern",ARG_TYPE_STRING,1,"GET",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE|CMD_ARG_MULTIPLE_TOKEN}, +{"pattern",ARG_TYPE_PATTERN,1,"GET",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE|CMD_ARG_MULTIPLE_TOKEN}, {"order",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=SORT_RO_order_Subargs}, {"sorting",ARG_TYPE_PURE_TOKEN,-1,"ALPHA",NULL,NULL,CMD_ARG_OPTIONAL}, {0} @@ -3048,7 +3051,7 @@ struct redisCommandArg PUBLISH_Args[] = { /* PUBSUB CHANNELS argument table */ struct redisCommandArg PUBSUB_CHANNELS_Args[] = { -{"pattern",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL}, +{"pattern",ARG_TYPE_PATTERN,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL}, {0} }; @@ -3092,7 +3095,7 @@ struct redisCommandArg PUBSUB_NUMSUB_Args[] = { /* PUBSUB SHARDCHANNELS argument table */ struct redisCommandArg PUBSUB_SHARDCHANNELS_Args[] = { -{"pattern",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL}, +{"pattern",ARG_TYPE_PATTERN,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL}, {0} }; @@ -3396,7 +3399,10 @@ NULL #define FUNCTION_LIST_History NULL /* FUNCTION LIST tips */ -#define FUNCTION_LIST_tips NULL +const char *FUNCTION_LIST_tips[] = { +"nondeterministic_output_order", +NULL +}; /* FUNCTION LIST argument table */ struct redisCommandArg FUNCTION_LIST_Args[] = { @@ -3845,7 +3851,7 @@ struct redisCommandArg SENTINEL_REPLICAS_Args[] = { /* SENTINEL RESET argument table */ struct redisCommandArg SENTINEL_RESET_Args[] = { -{"pattern",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, +{"pattern",ARG_TYPE_PATTERN,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {0} }; @@ -4169,7 +4175,10 @@ struct redisCommandArg BGSAVE_Args[] = { #define COMMAND_DOCS_History NULL /* COMMAND DOCS tips */ -#define COMMAND_DOCS_tips NULL +const char *COMMAND_DOCS_tips[] = { +"nondeterministic_output_order", +NULL +}; /* COMMAND DOCS argument table */ struct redisCommandArg COMMAND_DOCS_Args[] = { @@ -4210,7 +4219,10 @@ commandHistory COMMAND_INFO_History[] = { }; /* COMMAND INFO tips */ -#define COMMAND_INFO_tips NULL +const char *COMMAND_INFO_tips[] = { +"nondeterministic_output_order", +NULL +}; /* COMMAND INFO argument table */ struct redisCommandArg COMMAND_INFO_Args[] = { @@ -4224,7 +4236,10 @@ struct redisCommandArg COMMAND_INFO_Args[] = { #define COMMAND_LIST_History NULL /* COMMAND LIST tips */ -#define COMMAND_LIST_tips NULL +const char *COMMAND_LIST_tips[] = { +"nondeterministic_output_order", +NULL +}; /* COMMAND LIST filterby argument table */ struct redisCommandArg COMMAND_LIST_filterby_Subargs[] = { @@ -4245,7 +4260,7 @@ struct redisCommand COMMAND_Subcommands[] = { {"count","Get total number of Redis commands","O(1)","2.8.13",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_COUNT_History,COMMAND_COUNT_tips,commandCountCommand,2,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION}, {"docs","Get array of specific Redis command documentation","O(N) where N is the number of commands to look up","7.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_DOCS_History,COMMAND_DOCS_tips,commandDocsCommand,-2,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION,.args=COMMAND_DOCS_Args}, {"getkeys","Extract keys given a full Redis command","O(N) where N is the number of arguments to the command","2.8.13",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_GETKEYS_History,COMMAND_GETKEYS_tips,commandGetKeysCommand,-4,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION}, -{"getkeysandflags","Extract keys given a full Redis command","O(N) where N is the number of arguments to the command","7.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_GETKEYSANDFLAGS_History,COMMAND_GETKEYSANDFLAGS_tips,commandGetKeysAndFlagsCommand,-4,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION}, +{"getkeysandflags","Extract keys and access flags given a full Redis command","O(N) where N is the number of arguments to the command","7.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_GETKEYSANDFLAGS_History,COMMAND_GETKEYSANDFLAGS_tips,commandGetKeysAndFlagsCommand,-4,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION}, {"help","Show helpful text about the different subcommands","O(1)","5.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_HELP_History,COMMAND_HELP_tips,commandHelpCommand,2,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION}, {"info","Get array of specific Redis command details, or all when no argument is given.","O(N) where N is the number of commands to look up","2.8.13",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_INFO_History,COMMAND_INFO_tips,commandInfoCommand,-2,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION,.args=COMMAND_INFO_Args}, {"list","Get an array of Redis command names","O(N) where N is the total number of Redis commands","7.0.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SERVER,COMMAND_LIST_History,COMMAND_LIST_tips,commandListCommand,-2,CMD_LOADING|CMD_STALE,ACL_CATEGORY_CONNECTION,.args=COMMAND_LIST_Args}, @@ -4259,7 +4274,7 @@ struct redisCommand COMMAND_Subcommands[] = { /* COMMAND tips */ const char *COMMAND_tips[] = { -"nondeterministic_output", +"nondeterministic_output_order", NULL }; @@ -4497,7 +4512,12 @@ NULL #define LATENCY_DOCTOR_History NULL /* LATENCY DOCTOR tips */ -#define LATENCY_DOCTOR_tips NULL +const char *LATENCY_DOCTOR_tips[] = { +"nondeterministic_output", +"request_policy:all_nodes", +"response_policy:special", +NULL +}; /********** LATENCY GRAPH ********************/ @@ -4505,7 +4525,12 @@ NULL #define LATENCY_GRAPH_History NULL /* LATENCY GRAPH tips */ -#define LATENCY_GRAPH_tips NULL +const char *LATENCY_GRAPH_tips[] = { +"nondeterministic_output", +"request_policy:all_nodes", +"response_policy:special", +NULL +}; /* LATENCY GRAPH argument table */ struct redisCommandArg LATENCY_GRAPH_Args[] = { @@ -4632,6 +4657,8 @@ struct redisCommandArg LOLWUT_Args[] = { /* MEMORY DOCTOR tips */ const char *MEMORY_DOCTOR_tips[] = { "nondeterministic_output", +"request_policy:all_shards", +"response_policy:special", NULL }; @@ -4651,6 +4678,8 @@ NULL /* MEMORY MALLOC_STATS tips */ const char *MEMORY_MALLOC_STATS_tips[] = { "nondeterministic_output", +"request_policy:all_shards", +"response_policy:special", NULL }; @@ -4660,7 +4689,11 @@ NULL #define MEMORY_PURGE_History NULL /* MEMORY PURGE tips */ -#define MEMORY_PURGE_tips NULL +const char *MEMORY_PURGE_tips[] = { +"request_policy:all_shards", +"response_policy:all_succeeded", +NULL +}; /********** MEMORY STATS ********************/ @@ -4723,7 +4756,10 @@ struct redisCommand MEMORY_Subcommands[] = { #define MODULE_LIST_History NULL /* MODULE LIST tips */ -#define MODULE_LIST_tips NULL +const char *MODULE_LIST_tips[] = { +"nondeterministic_output_order", +NULL +}; /********** MODULE LOAD ********************/ @@ -4794,7 +4830,7 @@ commandHistory MONITOR_History[] = { /* PSYNC argument table */ struct redisCommandArg PSYNC_Args[] = { -{"replicationid",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, +{"replicationid",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {0} }; @@ -4818,7 +4854,7 @@ struct redisCommandArg PSYNC_Args[] = { /* REPLICAOF argument table */ struct redisCommandArg REPLICAOF_Args[] = { {"host",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, -{"port",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, +{"port",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {0} }; @@ -4884,7 +4920,7 @@ struct redisCommandArg SHUTDOWN_Args[] = { /* SLAVEOF argument table */ struct redisCommandArg SLAVEOF_Args[] = { {"host",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, -{"port",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, +{"port",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE}, {0} }; @@ -6819,7 +6855,11 @@ struct redisCommandArg MSET_Args[] = { #define MSETNX_History NULL /* MSETNX tips */ -#define MSETNX_tips NULL +const char *MSETNX_tips[] = { +"request_policy:multi_shard", +"response_policy:agg_min", +NULL +}; /* MSETNX key_value argument table */ struct redisCommandArg MSETNX_key_value_Subargs[] = { diff --git a/src/commands/cluster-shards.json b/src/commands/cluster-shards.json index 89361862d..925ce8bf3 100644 --- a/src/commands/cluster-shards.json +++ b/src/commands/cluster-shards.json @@ -1,18 +1,18 @@ { - "SHARDS": { - "summary": "Get array of cluster slots to node mappings", - "complexity": "O(N) where N is the total number of cluster nodes", - "group": "cluster", - "since": "7.0.0", - "arity": 2, - "container": "CLUSTER", - "function": "clusterCommand", - "history": [], - "command_flags": [ - "STALE" - ], - "command_tips": [ - "NONDETERMINISTIC_OUTPUT" - ] - } + "SHARDS": { + "summary": "Get array of cluster slots to node mappings", + "complexity": "O(N) where N is the total number of cluster nodes", + "group": "cluster", + "since": "7.0.0", + "arity": 2, + "container": "CLUSTER", + "function": "clusterCommand", + "history": [], + "command_flags": [ + "STALE" + ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT" + ] + } } diff --git a/src/commands/cluster-slots.json b/src/commands/cluster-slots.json index 9a94fc2da..6da781755 100644 --- a/src/commands/cluster-slots.json +++ b/src/commands/cluster-slots.json @@ -9,6 +9,9 @@ "function": "clusterCommand", "deprecated_since": "7.0.0", "replaced_by": "`CLUSTER SHARDS`", + "doc_flags": [ + "DEPRECATED" + ], "history": [ [ "4.0.0", diff --git a/src/commands/command-docs.json b/src/commands/command-docs.json index 9d2e20566..68a32f8a1 100644 --- a/src/commands/command-docs.json +++ b/src/commands/command-docs.json @@ -14,6 +14,9 @@ "acl_categories": [ "CONNECTION" ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT_ORDER" + ], "arguments": [ { "name": "command-name", diff --git a/src/commands/command-getkeysandflags.json b/src/commands/command-getkeysandflags.json index 1ac8e990d..44b3ddcb1 100644 --- a/src/commands/command-getkeysandflags.json +++ b/src/commands/command-getkeysandflags.json @@ -1,6 +1,6 @@ { "GETKEYSANDFLAGS": { - "summary": "Extract keys given a full Redis command", + "summary": "Extract keys and access flags given a full Redis command", "complexity": "O(N) where N is the number of arguments to the command", "group": "server", "since": "7.0.0", diff --git a/src/commands/command-info.json b/src/commands/command-info.json index 9291f8912..40d60a3ec 100644 --- a/src/commands/command-info.json +++ b/src/commands/command-info.json @@ -20,6 +20,9 @@ "acl_categories": [ "CONNECTION" ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT_ORDER" + ], "arguments": [ { "name": "command-name", diff --git a/src/commands/command-list.json b/src/commands/command-list.json index ca7cb71ed..49e9558ca 100644 --- a/src/commands/command-list.json +++ b/src/commands/command-list.json @@ -14,6 +14,9 @@ "acl_categories": [ "CONNECTION" ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT_ORDER" + ], "arguments": [ { "name": "filterby", diff --git a/src/commands/command.json b/src/commands/command.json index 83458e30c..0bed04040 100644 --- a/src/commands/command.json +++ b/src/commands/command.json @@ -15,7 +15,7 @@ "CONNECTION" ], "command_tips": [ - "NONDETERMINISTIC_OUTPUT" + "NONDETERMINISTIC_OUTPUT_ORDER" ] } } diff --git a/src/commands/function-list.json b/src/commands/function-list.json index 601299345..6513b80cb 100644 --- a/src/commands/function-list.json +++ b/src/commands/function-list.json @@ -10,6 +10,9 @@ "command_flags": [ "NOSCRIPT" ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT_ORDER" + ], "acl_categories": [ "SCRIPTING" ], diff --git a/src/commands/latency-doctor.json b/src/commands/latency-doctor.json index 2686c0d58..129b32358 100644 --- a/src/commands/latency-doctor.json +++ b/src/commands/latency-doctor.json @@ -12,6 +12,11 @@ "NOSCRIPT", "LOADING", "STALE" + ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT", + "REQUEST_POLICY:ALL_NODES", + "RESPONSE_POLICY:SPECIAL" ] } } diff --git a/src/commands/latency-graph.json b/src/commands/latency-graph.json index 0c8fe69c7..0644c1cb0 100644 --- a/src/commands/latency-graph.json +++ b/src/commands/latency-graph.json @@ -13,6 +13,11 @@ "LOADING", "STALE" ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT", + "REQUEST_POLICY:ALL_NODES", + "RESPONSE_POLICY:SPECIAL" + ], "arguments": [ { "name": "event", diff --git a/src/commands/latency-history.json b/src/commands/latency-history.json index 5d9f17436..6d9267064 100644 --- a/src/commands/latency-history.json +++ b/src/commands/latency-history.json @@ -18,7 +18,7 @@ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:SPECIAL" ], - "arguments": [ + "arguments": [ { "name": "event", "type": "string" diff --git a/src/commands/memory-doctor.json b/src/commands/memory-doctor.json index 590778a7c..b6691dfa0 100644 --- a/src/commands/memory-doctor.json +++ b/src/commands/memory-doctor.json @@ -8,7 +8,9 @@ "container": "MEMORY", "function": "memoryCommand", "command_tips": [ - "NONDETERMINISTIC_OUTPUT" + "NONDETERMINISTIC_OUTPUT", + "REQUEST_POLICY:ALL_SHARDS", + "RESPONSE_POLICY:SPECIAL" ] } } diff --git a/src/commands/memory-malloc-stats.json b/src/commands/memory-malloc-stats.json index 69265c6e7..5106781fe 100644 --- a/src/commands/memory-malloc-stats.json +++ b/src/commands/memory-malloc-stats.json @@ -8,7 +8,9 @@ "container": "MEMORY", "function": "memoryCommand", "command_tips": [ - "NONDETERMINISTIC_OUTPUT" + "NONDETERMINISTIC_OUTPUT", + "REQUEST_POLICY:ALL_SHARDS", + "RESPONSE_POLICY:SPECIAL" ] } } diff --git a/src/commands/memory-purge.json b/src/commands/memory-purge.json index 7cac7389d..b862534d1 100644 --- a/src/commands/memory-purge.json +++ b/src/commands/memory-purge.json @@ -6,6 +6,10 @@ "since": "4.0.0", "arity": 2, "container": "MEMORY", - "function": "memoryCommand" + "function": "memoryCommand", + "command_tips": [ + "REQUEST_POLICY:ALL_SHARDS", + "RESPONSE_POLICY:ALL_SUCCEEDED" + ] } } diff --git a/src/commands/migrate.json b/src/commands/migrate.json index 5a633e0dc..d07fe4b15 100644 --- a/src/commands/migrate.json +++ b/src/commands/migrate.json @@ -84,7 +84,7 @@ }, { "name": "port", - "type": "string" + "type": "integer" }, { "name": "key_or_empty_string", diff --git a/src/commands/module-list.json b/src/commands/module-list.json index 56a7cd3f5..ed6e7d19b 100644 --- a/src/commands/module-list.json +++ b/src/commands/module-list.json @@ -10,6 +10,9 @@ "command_flags": [ "ADMIN", "NOSCRIPT" + ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT_ORDER" ] } } diff --git a/src/commands/msetnx.json b/src/commands/msetnx.json index 7984598a2..544ac6450 100644 --- a/src/commands/msetnx.json +++ b/src/commands/msetnx.json @@ -13,6 +13,10 @@ "acl_categories": [ "STRING" ], + "command_tips": [ + "REQUEST_POLICY:MULTI_SHARD", + "RESPONSE_POLICY:AGG_MIN" + ], "key_specs": [ { "flags": [ diff --git a/src/commands/object-refcount.json b/src/commands/object-refcount.json index 273dd0759..0f36f5092 100644 --- a/src/commands/object-refcount.json +++ b/src/commands/object-refcount.json @@ -13,6 +13,9 @@ "acl_categories": [ "KEYSPACE" ], + "command_tips": [ + "NONDETERMINISTIC_OUTPUT" + ], "key_specs": [ { "flags": [ diff --git a/src/commands/psync.json b/src/commands/psync.json index 1e0425220..91175a198 100644 --- a/src/commands/psync.json +++ b/src/commands/psync.json @@ -14,7 +14,7 @@ "arguments": [ { "name": "replicationid", - "type": "integer" + "type": "string" }, { "name": "offset", diff --git a/src/commands/pubsub-channels.json b/src/commands/pubsub-channels.json index 2b4e765d1..0522504b1 100644 --- a/src/commands/pubsub-channels.json +++ b/src/commands/pubsub-channels.json @@ -15,7 +15,7 @@ "arguments": [ { "name": "pattern", - "type": "string", + "type": "pattern", "optional": true } ] diff --git a/src/commands/pubsub-shardchannels.json b/src/commands/pubsub-shardchannels.json index 450cd8dcd..3bffa221f 100644 --- a/src/commands/pubsub-shardchannels.json +++ b/src/commands/pubsub-shardchannels.json @@ -1,23 +1,23 @@ { - "SHARDCHANNELS": { - "summary": "List active shard channels", - "complexity": "O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short channels).", - "group": "pubsub", - "since": "7.0.0", - "arity": -2, - "container": "PUBSUB", - "function": "pubsubCommand", - "command_flags": [ - "PUBSUB", - "LOADING", - "STALE" - ], - "arguments": [ - { - "name": "pattern", - "type": "string", - "optional": true - } - ] - } + "SHARDCHANNELS": { + "summary": "List active shard channels", + "complexity": "O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short channels).", + "group": "pubsub", + "since": "7.0.0", + "arity": -2, + "container": "PUBSUB", + "function": "pubsubCommand", + "command_flags": [ + "PUBSUB", + "LOADING", + "STALE" + ], + "arguments": [ + { + "name": "pattern", + "type": "pattern", + "optional": true + } + ] + } } diff --git a/src/commands/pubsub-shardnumsub.json b/src/commands/pubsub-shardnumsub.json index 55f5101ac..8c51549b0 100644 --- a/src/commands/pubsub-shardnumsub.json +++ b/src/commands/pubsub-shardnumsub.json @@ -1,24 +1,24 @@ { - "SHARDNUMSUB": { - "summary": "Get the count of subscribers for shard channels", - "complexity": "O(N) for the SHARDNUMSUB subcommand, where N is the number of requested channels", - "group": "pubsub", - "since": "7.0.0", - "arity": -2, - "container": "PUBSUB", - "function": "pubsubCommand", - "command_flags": [ - "PUBSUB", - "LOADING", - "STALE" - ], - "arguments": [ - { - "name": "channel", - "type": "string", - "optional": true, - "multiple": true - } - ] - } + "SHARDNUMSUB": { + "summary": "Get the count of subscribers for shard channels", + "complexity": "O(N) for the SHARDNUMSUB subcommand, where N is the number of requested channels", + "group": "pubsub", + "since": "7.0.0", + "arity": -2, + "container": "PUBSUB", + "function": "pubsubCommand", + "command_flags": [ + "PUBSUB", + "LOADING", + "STALE" + ], + "arguments": [ + { + "name": "channel", + "type": "string", + "optional": true, + "multiple": true + } + ] + } } diff --git a/src/commands/replicaof.json b/src/commands/replicaof.json index 805b81e4c..6299ea3ff 100644 --- a/src/commands/replicaof.json +++ b/src/commands/replicaof.json @@ -19,7 +19,7 @@ }, { "name": "port", - "type": "string" + "type": "integer" } ] } diff --git a/src/commands/sentinel-config.json b/src/commands/sentinel-config.json index c977341f3..74bcdbd50 100644 --- a/src/commands/sentinel-config.json +++ b/src/commands/sentinel-config.json @@ -12,7 +12,7 @@ "SENTINEL", "ONLY_SENTINEL" ], - "arguments":[ + "arguments": [ { "name":"set_or_get", "type":"oneof", diff --git a/src/commands/sentinel-reset.json b/src/commands/sentinel-reset.json index bf12c6f0a..9c60c6be7 100644 --- a/src/commands/sentinel-reset.json +++ b/src/commands/sentinel-reset.json @@ -15,7 +15,7 @@ "arguments": [ { "name": "pattern", - "type": "string" + "type": "pattern" } ] } diff --git a/src/commands/slaveof.json b/src/commands/slaveof.json index 271eb2d1b..70560f1b6 100644 --- a/src/commands/slaveof.json +++ b/src/commands/slaveof.json @@ -24,7 +24,7 @@ }, { "name": "port", - "type": "string" + "type": "integer" } ] } diff --git a/src/commands/sort.json b/src/commands/sort.json index 01ac2745d..3f077e0e5 100644 --- a/src/commands/sort.json +++ b/src/commands/sort.json @@ -96,7 +96,7 @@ "token": "GET", "name": "pattern", "key_spec_index": 1, - "type": "string", + "type": "pattern", "optional": true, "multiple": true, "multiple_token": true diff --git a/src/commands/sort_ro.json b/src/commands/sort_ro.json index 11336c52c..83b48d1b3 100644 --- a/src/commands/sort_ro.json +++ b/src/commands/sort_ro.json @@ -82,7 +82,7 @@ "token": "GET", "name": "pattern", "key_spec_index": 1, - "type": "string", + "type": "pattern", "optional": true, "multiple": true, "multiple_token": true diff --git a/src/commands/spublish.json b/src/commands/spublish.json index 2cbcdc19a..816ff0ad3 100644 --- a/src/commands/spublish.json +++ b/src/commands/spublish.json @@ -1,46 +1,46 @@ { - "SPUBLISH": { - "summary": "Post a message to a shard channel", - "complexity": "O(N) where N is the number of clients subscribed to the receiving shard channel.", - "group": "pubsub", - "since": "7.0.0", - "arity": 3, - "function": "spublishCommand", - "command_flags": [ - "PUBSUB", - "LOADING", - "STALE", - "FAST", - "MAY_REPLICATE" - ], - "arguments": [ - { - "name": "channel", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ], - "key_specs": [ - { - "flags": [ - "NOT_KEY" + "SPUBLISH": { + "summary": "Post a message to a shard channel", + "complexity": "O(N) where N is the number of clients subscribed to the receiving shard channel.", + "group": "pubsub", + "since": "7.0.0", + "arity": 3, + "function": "spublishCommand", + "command_flags": [ + "PUBSUB", + "LOADING", + "STALE", + "FAST", + "MAY_REPLICATE" ], - "begin_search": { - "index": { - "pos": 1 - } - }, - "find_keys": { - "range": { - "lastkey": 0, - "step": 1, - "limit": 0 - } - } - } - ] - } + "arguments": [ + { + "name": "channel", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ], + "key_specs": [ + { + "flags": [ + "NOT_KEY" + ], + "begin_search": { + "index": { + "pos": 1 + } + }, + "find_keys": { + "range": { + "lastkey": 0, + "step": 1, + "limit": 0 + } + } + } + ] + } } diff --git a/src/commands/ssubscribe.json b/src/commands/ssubscribe.json index eb570ea53..c49f801a6 100644 --- a/src/commands/ssubscribe.json +++ b/src/commands/ssubscribe.json @@ -1,42 +1,42 @@ { - "SSUBSCRIBE": { - "summary": "Listen for messages published to the given shard channels", - "complexity": "O(N) where N is the number of shard channels to subscribe to.", - "group": "pubsub", - "since": "7.0.0", - "arity": -2, - "function": "ssubscribeCommand", - "command_flags": [ - "PUBSUB", - "NOSCRIPT", - "LOADING", - "STALE" - ], - "arguments": [ - { - "name": "channel", - "type": "string", - "multiple": true - } - ], - "key_specs": [ - { - "flags": [ - "NOT_KEY" + "SSUBSCRIBE": { + "summary": "Listen for messages published to the given shard channels", + "complexity": "O(N) where N is the number of shard channels to subscribe to.", + "group": "pubsub", + "since": "7.0.0", + "arity": -2, + "function": "ssubscribeCommand", + "command_flags": [ + "PUBSUB", + "NOSCRIPT", + "LOADING", + "STALE" ], - "begin_search": { - "index": { - "pos": 1 - } - }, - "find_keys": { - "range": { - "lastkey": -1, - "step": 1, - "limit": 0 - } - } - } - ] - } + "arguments": [ + { + "name": "channel", + "type": "string", + "multiple": true + } + ], + "key_specs": [ + { + "flags": [ + "NOT_KEY" + ], + "begin_search": { + "index": { + "pos": 1 + } + }, + "find_keys": { + "range": { + "lastkey": -1, + "step": 1, + "limit": 0 + } + } + } + ] + } } diff --git a/src/commands/sunsubscribe.json b/src/commands/sunsubscribe.json index 481415490..5b428237b 100644 --- a/src/commands/sunsubscribe.json +++ b/src/commands/sunsubscribe.json @@ -1,43 +1,43 @@ { - "SUNSUBSCRIBE": { - "summary": "Stop listening for messages posted to the given shard channels", - "complexity": "O(N) where N is the number of clients already subscribed to a channel.", - "group": "pubsub", - "since": "7.0.0", - "arity": -1, - "function": "sunsubscribeCommand", - "command_flags": [ - "PUBSUB", - "NOSCRIPT", - "LOADING", - "STALE" - ], - "arguments": [ - { - "name": "channel", - "type": "string", - "optional": true, - "multiple": true - } - ], - "key_specs": [ - { - "flags": [ - "NOT_KEY" + "SUNSUBSCRIBE": { + "summary": "Stop listening for messages posted to the given shard channels", + "complexity": "O(N) where N is the number of clients already subscribed to a channel.", + "group": "pubsub", + "since": "7.0.0", + "arity": -1, + "function": "sunsubscribeCommand", + "command_flags": [ + "PUBSUB", + "NOSCRIPT", + "LOADING", + "STALE" ], - "begin_search": { - "index": { - "pos": 1 - } - }, - "find_keys": { - "range": { - "lastkey": -1, - "step": 1, - "limit": 0 - } - } - } - ] - } + "arguments": [ + { + "name": "channel", + "type": "string", + "optional": true, + "multiple": true + } + ], + "key_specs": [ + { + "flags": [ + "NOT_KEY" + ], + "begin_search": { + "index": { + "pos": 1 + } + }, + "find_keys": { + "range": { + "lastkey": -1, + "step": 1, + "limit": 0 + } + } + } + ] + } } |