Unverified Commit 119ec91a authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix typos and limit unknown command error message (#10634)

minor cleanup for recent changes.
parent 0c35f54f
...@@ -1002,7 +1002,7 @@ void bitposCommand(client *c) { ...@@ -1002,7 +1002,7 @@ void bitposCommand(client *c) {
} }
} }
/* BITFIELD key subcommmand-1 arg ... subcommand-2 arg ... subcommand-N ... /* BITFIELD key subcommand-1 arg ... subcommand-2 arg ... subcommand-N ...
* *
* Supported subcommands: * Supported subcommands:
* *
......
...@@ -1049,9 +1049,9 @@ RedisModuleCommand *moduleCreateCommandProxy(struct RedisModule *module, sds dec ...@@ -1049,9 +1049,9 @@ RedisModuleCommand *moduleCreateCommandProxy(struct RedisModule *module, sds dec
* serve stale data. Don't use if you don't know what * serve stale data. Don't use if you don't know what
* this means. * this means.
* * **"no-monitor"**: Don't propagate the command on monitor. Use this if * * **"no-monitor"**: Don't propagate the command on monitor. Use this if
* the command has sensible data among the arguments. * the command has sensitive data among the arguments.
* * **"no-slowlog"**: Don't log this command in the slowlog. Use this if * * **"no-slowlog"**: Don't log this command in the slowlog. Use this if
* the command has sensible data among the arguments. * the command has sensitive data among the arguments.
* * **"fast"**: The command time complexity is not greater * * **"fast"**: The command time complexity is not greater
* than O(log(N)) where N is the size of the collection or * than O(log(N)) where N is the size of the collection or
* anything else representing the normal scalability * anything else representing the normal scalability
......
...@@ -3812,7 +3812,7 @@ void flushSlavesOutputBuffers(void) { ...@@ -3812,7 +3812,7 @@ void flushSlavesOutputBuffers(void) {
} }
} }
/* Compute current most restictive pause type and its end time, aggregated for /* Compute current most restrictive pause type and its end time, aggregated for
* all pause purposes. */ * all pause purposes. */
static void updateClientPauseTypeAndEndTime(void) { static void updateClientPauseTypeAndEndTime(void) {
pause_type old_type = server.client_pause_type; pause_type old_type = server.client_pause_type;
......
...@@ -3494,7 +3494,7 @@ void populateCommandMovableKeys(struct redisCommand *cmd) { ...@@ -3494,7 +3494,7 @@ void populateCommandMovableKeys(struct redisCommand *cmd) {
cmd->flags |= CMD_MOVABLE_KEYS; cmd->flags |= CMD_MOVABLE_KEYS;
} }
/* Check if c->cmd exists, fills `err` with deatils in case it doesn't /* Check if c->cmd exists, fills `err` with details in case it doesn't.
* Return 1 if exists. */ * Return 1 if exists. */
int commandCheckExistence(client *c, sds *err) { int commandCheckExistence(client *c, sds *err) {
if (c->cmd) if (c->cmd)
...@@ -3516,14 +3516,14 @@ int commandCheckExistence(client *c, sds *err) { ...@@ -3516,14 +3516,14 @@ int commandCheckExistence(client *c, sds *err) {
for (i=1; i < c->argc && sdslen(args) < 128; i++) for (i=1; i < c->argc && sdslen(args) < 128; i++)
args = sdscatprintf(args, "'%.*s' ", 128-(int)sdslen(args), (char*)c->argv[i]->ptr); args = sdscatprintf(args, "'%.*s' ", 128-(int)sdslen(args), (char*)c->argv[i]->ptr);
*err = sdsnew(NULL); *err = sdsnew(NULL);
*err = sdscatprintf(*err, "unknown command '%s', with args beginning with: %s", *err = sdscatprintf(*err, "unknown command '%.128s', with args beginning with: %s",
(char*)c->argv[0]->ptr, args); (char*)c->argv[0]->ptr, args);
sdsfree(args); sdsfree(args);
} }
return 0; return 0;
} }
/* Check if c->argc is valid for c->cmd, fills `err` with deatils in case it isn't /* Check if c->argc is valid for c->cmd, fills `err` with details in case it isn't.
* Return 1 if valid. */ * Return 1 if valid. */
int commandCheckArity(client *c, sds *err) { int commandCheckArity(client *c, sds *err) {
if ((c->cmd->arity > 0 && c->cmd->arity != c->argc) || if ((c->cmd->arity > 0 && c->cmd->arity != c->argc) ||
......
...@@ -1062,7 +1062,7 @@ typedef struct replBacklog { ...@@ -1062,7 +1062,7 @@ typedef struct replBacklog {
listNode *ref_repl_buf_node; /* Referenced node of replication buffer blocks, listNode *ref_repl_buf_node; /* Referenced node of replication buffer blocks,
* see the definition of replBufBlock. */ * see the definition of replBufBlock. */
size_t unindexed_count; /* The count from last creating index block. */ size_t unindexed_count; /* The count from last creating index block. */
rax *blocks_index; /* The index of reocrded blocks of replication rax *blocks_index; /* The index of recorded blocks of replication
* buffer for quickly searching replication * buffer for quickly searching replication
* offset on partial resynchronization. */ * offset on partial resynchronization. */
long long histlen; /* Backlog actual data length */ long long histlen; /* Backlog actual data length */
......
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