MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lookupCommandOrOriginal

Function lookupCommandOrOriginal

app/redis-6.2.6/src/server.c:3553–3558  ·  view source on GitHub ↗

Lookup the command in the current table, if not found also check in * the original table containing the original command names unaffected by * redis.conf rename-command statement. * * This is used by functions rewriting the argument vector such as * rewriteClientCommandVector() in order to set client->cmd pointer * correctly even if the command was renamed. */

Source from the content-addressed store, hash-verified

3551 * rewriteClientCommandVector() in order to set client->cmd pointer
3552 * correctly even if the command was renamed. */
3553struct redisCommand *lookupCommandOrOriginal(sds name) {
3554 struct redisCommand *cmd = dictFetchValue(server.commands, name);
3555
3556 if (!cmd) cmd = dictFetchValue(server.orig_commands,name);
3557 return cmd;
3558}
3559
3560/* Propagate the specified command (in the context of the specified database id)
3561 * to AOF and Slaves.

Callers 2

Calls 1

dictFetchValueFunction · 0.85

Tested by

no test coverage detected