redict/tests/unit/moduleapi
Oran Agra 3204a03574
Move doc metadata from COMMAND to COMMAND DOCS (#10056)
Syntax:
`COMMAND DOCS [<command name> ...]`

Background:
Apparently old version of hiredis (and thus also redis-cli) can't
support more than 7 levels of multi-bulk nesting.

The solution is to move all the doc related metadata from COMMAND to a
new COMMAND DOCS sub-command.

The new DOCS sub-command returns a map of commands (not an array like in COMMAND),
And the same goes for the `subcommands` field inside it (also contains a map)

Besides that, the remaining new fields of COMMAND (hints, key-specs, and
sub-commands), are placed in the outer array rather than a nested map.
this was done mainly for consistency with the old format.

Other changes:
---
* Allow COMMAND INFO with no arguments, which returns all commands, so that we can some day deprecated
  the plain COMMAND (no args)

* Reduce the amount of deferred replies from both COMMAND and COMMAND
  DOCS, especially in the inner loops, since these create many small
  reply objects, which lead to many small write syscalls and many small
  TCP packets.
  To make this easier, when populating the command table, we count the
  history, args, and hints so we later know their size in advance.
  Additionally, the movablekeys flag was moved into the flags register.
* Update generate-commands-json.py to take the data from both command, it
  now executes redis-cli directly, instead of taking input from stdin.
* Sub-commands in both COMMAND (and COMMAND INFO), and also COMMAND DOCS,
  show their full name. i.e. CONFIG 
*   GET will be shown as `config|get` rather than just `get`.
  This will be visible both when asking for `COMMAND INFO config` and COMMAND INFO config|get`, but is
  especially important for the later.
  i.e. imagine someone doing `COMMAND INFO slowlog|get config|get` not being able to distinguish between the two
  items in the array response.
2022-01-11 17:16:16 +02:00
..
aclcheck.tcl Adding ACL support for modules (#9309) 2021-09-23 08:52:56 +03:00
auth.tcl Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
basics.tcl Protected configs and sensitive commands (#9920) 2021-12-19 10:46:16 +02:00
blockedclient.tcl Fix module blocked clients RESP version (#9634) 2021-10-21 14:01:10 +03:00
blockonbackground.tcl Changed latency histogram output to omit trailing 0s and periods (#10075) 2022-01-09 17:04:18 -08:00
blockonkeys.tcl Test that module can wake up module blocked on non-empty list key (#8382) 2021-01-22 16:19:37 +02:00
cluster.tcl fix new cluster tests issues (#9657) 2021-10-20 15:40:28 +03:00
commandfilter.tcl Remove const from CommandFilterArgGet result (#9247) 2021-08-01 11:29:32 +03:00
datatype2.tcl Tests: don't rely on the response of MEMORY USAGE when mem_allocator is not jemalloc (#10010) 2021-12-27 21:37:21 +02:00
datatype.tcl Modules: add RM_LoadDataTypeFromStringEncver (#9537) 2021-09-30 11:21:32 +03:00
defrag.tcl Tests: fix new defrag test to be skipped when not supported (#8185) 2020-12-14 11:13:46 +02:00
fork.tcl Set errno to EEXIST in redisFork() if child process exists (#10059) 2022-01-06 09:54:21 +02:00
getkeys.tcl Auto-generate the command table from JSON files (#9656) 2021-12-15 21:23:15 +02:00
hash.tcl Modules: In RM_HashSet, add COUNT_ALL flag and set errno (#8446) 2021-02-15 11:40:05 +02:00
hooks.tcl Add Swapdb Module Event (#7804) 2020-09-20 13:36:20 +03:00
infotest.tcl Escape unsafe field name characters in INFO. (#8492) 2021-02-15 17:08:53 +02:00
infra.tcl add test for modules load/unload and config rewrite 2021-06-01 13:43:48 +03:00
keyspace_events.tcl Modules: adding a module type for key space notification (#8759) 2021-04-19 21:33:26 +03:00
keyspecs.tcl Move doc metadata from COMMAND to COMMAND DOCS (#10056) 2022-01-11 17:16:16 +02:00
list.tcl Modules: Add remaining list API functions (#8439) 2021-09-14 17:48:06 +03:00
misc.tcl QUIT is a command, HOST: and POST are not (#9798) 2021-11-23 10:38:25 +02:00
propagate.tcl use startEvictionTimeProc() in config set maxmemory (#10019) 2022-01-04 13:08:10 +02:00
reply.tcl fix valgrind issues with long double module test (#9709) 2021-11-01 13:41:35 +02:00
scan.tcl Fix RM_ScanKey module api not to return int encoded strings 2020-06-14 11:20:15 +03:00
stream.tcl Add modules API for streams (#8288) 2021-01-28 16:19:43 +02:00
subcommands.tcl Move doc metadata from COMMAND to COMMAND DOCS (#10056) 2022-01-11 17:16:16 +02:00
test_lazyfree.tcl Sort out mess around propagation and MULTI/EXEC (#9890) 2021-12-23 00:03:48 +02:00
testrdb.tcl Wait for asyn_loading to stop in short read test (#9841) 2021-11-24 12:46:43 +02:00
timer.tcl Add timer module API tests. (#8041) 2020-11-11 22:57:33 +02:00
zset.tcl RM_ZsetRem: Delete key if empty (#8453) 2021-02-05 19:54:01 +02:00