Bump codespell to 2.2.4, fix typos and outupdated comments (#11911)

Fix some seen typos and wrong comments.
This commit is contained in:
Binbin 2023-03-16 14:50:32 +08:00 committed by GitHub
parent f8a5a4f70c
commit 0b159b34ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 23 additions and 24 deletions

View File

@ -1 +1 @@
codespell==2.2.2 codespell==2.2.4

View File

@ -1972,7 +1972,7 @@ zset-max-listpack-entries 128
zset-max-listpack-value 64 zset-max-listpack-value 64
# HyperLogLog sparse representation bytes limit. The limit includes the # HyperLogLog sparse representation bytes limit. The limit includes the
# 16 bytes header. When an HyperLogLog using the sparse representation crosses # 16 bytes header. When a HyperLogLog using the sparse representation crosses
# this limit, it is converted into the dense representation. # this limit, it is converted into the dense representation.
# #
# A value greater than 16000 is totally useless, since at that point the # A value greater than 16000 is totally useless, since at that point the

View File

@ -612,7 +612,6 @@ void blockPostponeClient(client *c) {
/* Block client due to shutdown command */ /* Block client due to shutdown command */
void blockClientShutdown(client *c) { void blockClientShutdown(client *c) {
blockClient(c, BLOCKED_SHUTDOWN); blockClient(c, BLOCKED_SHUTDOWN);
/* Mark this client to execute its command */
} }
/* Unblock a client once a specific key became available for it. /* Unblock a client once a specific key became available for it.

View File

@ -144,7 +144,7 @@
* In the example the sparse representation used just 7 bytes instead * In the example the sparse representation used just 7 bytes instead
* of 12k in order to represent the HLL registers. In general for low * of 12k in order to represent the HLL registers. In general for low
* cardinality there is a big win in terms of space efficiency, traded * cardinality there is a big win in terms of space efficiency, traded
* with CPU time since the sparse representation is slower to access: * with CPU time since the sparse representation is slower to access.
* *
* The following table shows average cardinality vs bytes used, 100 * The following table shows average cardinality vs bytes used, 100
* samples per cardinality (when the set was not representable because * samples per cardinality (when the set was not representable because

View File

@ -732,7 +732,7 @@ unsigned char *lpFind(unsigned char *lp, unsigned char *p, unsigned char *s,
/* Skip entry */ /* Skip entry */
skipcnt--; skipcnt--;
/* Move to next entry, avoid use `lpNext` due to `ASSERT_INTEGRITY` in /* Move to next entry, avoid use `lpNext` due to `lpAssertValidEntry` in
* `lpNext` will call `lpBytes`, will cause performance degradation */ * `lpNext` will call `lpBytes`, will cause performance degradation */
p = lpSkip(p); p = lpSkip(p);
} }

View File

@ -2458,7 +2458,7 @@ int processPendingCommandAndInputBuffer(client *c) {
/* Now process client if it has more data in it's buffer. /* Now process client if it has more data in it's buffer.
* *
* Note: when a master client steps into this function, * Note: when a master client steps into this function,
* it can always satisfy this condition, because its querbuf * it can always satisfy this condition, because its querybuf
* contains data not applied. */ * contains data not applied. */
if (c->querybuf && sdslen(c->querybuf) > 0) { if (c->querybuf && sdslen(c->querybuf) > 0) {
return processInputBuffer(c); return processInputBuffer(c);
@ -4071,7 +4071,7 @@ static inline void setIOPendingCount(int i, unsigned long count) {
} }
void *IOThreadMain(void *myid) { void *IOThreadMain(void *myid) {
/* The ID is the thread number (from 0 to server.iothreads_num-1), and is /* The ID is the thread number (from 0 to server.io_threads_num-1), and is
* used by the thread to just manipulate a single sub-array of clients. */ * used by the thread to just manipulate a single sub-array of clients. */
long id = (unsigned long)myid; long id = (unsigned long)myid;
char thdname[16]; char thdname[16];

View File

@ -160,7 +160,7 @@ int scriptPrepareForRun(scriptRunCtx *run_ctx, client *engine_client, client *ca
return C_ERR; return C_ERR;
} }
/* Deny writes if we're unale to persist. */ /* Deny writes if we're unable to persist. */
int deny_write_type = writeCommandsDeniedByDiskError(); int deny_write_type = writeCommandsDeniedByDiskError();
if (deny_write_type != DISK_ERROR_TYPE_NONE && !obey_client) { if (deny_write_type != DISK_ERROR_TYPE_NONE && !obey_client) {
if (deny_write_type == DISK_ERROR_TYPE_RDB) if (deny_write_type == DISK_ERROR_TYPE_RDB)

View File

@ -216,7 +216,7 @@ mstime_t commandTimeSnapshot(void) {
* may re-open the same key multiple times, can invalidate an already * may re-open the same key multiple times, can invalidate an already
* open object in a next call, if the next call will see the key expired, * open object in a next call, if the next call will see the key expired,
* while the first did not. * while the first did not.
* This is specificlally important in the context of scripts, where we * This is specifically important in the context of scripts, where we
* pretend that time freezes. This way a key can expire only the first time * pretend that time freezes. This way a key can expire only the first time
* it is accessed and not in the middle of the script execution, making * it is accessed and not in the middle of the script execution, making
* propagation to slaves / AOF consistent. See issue #1525 for more info. * propagation to slaves / AOF consistent. See issue #1525 for more info.

View File

@ -895,7 +895,7 @@ struct redisObject {
void *ptr; void *ptr;
}; };
/* The a string name for an object's type as listed above /* The string name for an object's type as listed above
* Native types are checked against the OBJ_STRING, OBJ_LIST, OBJ_* defines, * Native types are checked against the OBJ_STRING, OBJ_LIST, OBJ_* defines,
* and Module types have their registered name returned. */ * and Module types have their registered name returned. */
char *getObjectTypeName(robj*); char *getObjectTypeName(robj*);
@ -929,7 +929,7 @@ typedef struct clientReplyBlock {
* | / \ * | / \
* | / \ * | / \
* Repl Backlog Replica_A Replica_B * Repl Backlog Replica_A Replica_B
* *
* Each replica or replication backlog increments only the refcount of the * Each replica or replication backlog increments only the refcount of the
* 'ref_repl_buf_node' which it points to. So when replica walks to the next * 'ref_repl_buf_node' which it points to. So when replica walks to the next
* node, it should first increase the next node's refcount, and when we trim * node, it should first increase the next node's refcount, and when we trim
@ -1087,7 +1087,7 @@ typedef struct {
need more reserved IDs use UINT64_MAX-1, need more reserved IDs use UINT64_MAX-1,
-2, ... and so forth. */ -2, ... and so forth. */
/* Replication backlog is not separate memory, it just is one consumer of /* Replication backlog is not a separate memory, it just is one consumer of
* the global replication buffer. This structure records the reference of * the global replication buffer. This structure records the reference of
* replication buffers. Since the replication buffer block list may be very long, * replication buffers. Since the replication buffer block list may be very long,
* it would cost much time to search replication offset on partial resync, so * it would cost much time to search replication offset on partial resync, so
@ -1223,7 +1223,7 @@ typedef struct client {
* unloaded for cleanup. Opaque for Redis Core.*/ * unloaded for cleanup. Opaque for Redis Core.*/
/* If this client is in tracking mode and this field is non zero, /* If this client is in tracking mode and this field is non zero,
* invalidation messages for keys fetched by this client will be send to * invalidation messages for keys fetched by this client will be sent to
* the specified client ID. */ * the specified client ID. */
uint64_t client_tracking_redirection; uint64_t client_tracking_redirection;
rax *client_tracking_prefixes; /* A dictionary of prefixes we are already rax *client_tracking_prefixes; /* A dictionary of prefixes we are already
@ -1786,7 +1786,7 @@ struct redisServer {
char *rdb_pipe_buff; /* In diskless replication, this buffer holds data */ char *rdb_pipe_buff; /* In diskless replication, this buffer holds data */
int rdb_pipe_bufflen; /* that was read from the rdb pipe. */ int rdb_pipe_bufflen; /* that was read from the rdb pipe. */
int rdb_key_save_delay; /* Delay in microseconds between keys while int rdb_key_save_delay; /* Delay in microseconds between keys while
* writing the RDB. (for testings). negative * writing aof or rdb. (for testings). negative
* value means fractions of microseconds (on average). */ * value means fractions of microseconds (on average). */
int key_load_delay; /* Delay in microseconds between keys while int key_load_delay; /* Delay in microseconds between keys while
* loading aof or rdb. (for testings). negative * loading aof or rdb. (for testings). negative
@ -1964,7 +1964,7 @@ struct redisServer {
REDISMODULE_CLUSTER_FLAG_*. */ REDISMODULE_CLUSTER_FLAG_*. */
int cluster_allow_reads_when_down; /* Are reads allowed when the cluster int cluster_allow_reads_when_down; /* Are reads allowed when the cluster
is down? */ is down? */
int cluster_config_file_lock_fd; /* cluster config fd, will be flock */ int cluster_config_file_lock_fd; /* cluster config fd, will be flocked. */
unsigned long long cluster_link_msg_queue_limit_bytes; /* Memory usage limit on individual link msg queue */ unsigned long long cluster_link_msg_queue_limit_bytes; /* Memory usage limit on individual link msg queue */
int cluster_drop_packet_filter; /* Debug config that allows tactically int cluster_drop_packet_filter; /* Debug config that allows tactically
* dropping packets of a specific type */ * dropping packets of a specific type */

View File

@ -526,7 +526,7 @@ void lpushxCommand(client *c) {
pushGenericCommand(c,LIST_HEAD,1); pushGenericCommand(c,LIST_HEAD,1);
} }
/* RPUSH <key> <element> [<element> ...] */ /* RPUSHX <key> <element> [<element> ...] */
void rpushxCommand(client *c) { void rpushxCommand(client *c) {
pushGenericCommand(c,LIST_TAIL,1); pushGenericCommand(c,LIST_TAIL,1);
} }

View File

@ -83,7 +83,7 @@ start_server {tags {"pause network"}} {
$rd2 close $rd2 close
} }
test "Test read/admin mutli-execs are not blocked by pause RO" { test "Test read/admin multi-execs are not blocked by pause RO" {
r SET FOO BAR r SET FOO BAR
r client PAUSE 100000 WRITE r client PAUSE 100000 WRITE
set rr [redis_client] set rr [redis_client]
@ -96,7 +96,7 @@ start_server {tags {"pause network"}} {
$rr close $rr close
} }
test "Test write mutli-execs are blocked by pause RO" { test "Test write multi-execs are blocked by pause RO" {
set rd [redis_deferring_client] set rd [redis_deferring_client]
$rd MULTI $rd MULTI
assert_equal [$rd read] "OK" assert_equal [$rd read] "OK"
@ -174,7 +174,7 @@ start_server {tags {"pause network"}} {
$rr close $rr close
} }
test "Test read-only scripts in mutli-exec are not blocked by pause RO" { test "Test read-only scripts in multi-exec are not blocked by pause RO" {
r SET FOO BAR r SET FOO BAR
r client PAUSE 100000 WRITE r client PAUSE 100000 WRITE
set rr [redis_client] set rr [redis_client]
@ -193,7 +193,7 @@ start_server {tags {"pause network"}} {
$rr close $rr close
} }
test "Test write scripts in mutli-exec are blocked by pause RO" { test "Test write scripts in multi-exec are blocked by pause RO" {
set rd [redis_deferring_client] set rd [redis_deferring_client]
set rd2 [redis_deferring_client] set rd2 [redis_deferring_client]

View File

@ -2198,8 +2198,8 @@ foreach {pop} {BLPOP BLMPOP_RIGHT} {
$rd1 BLPOP mylist 0 $rd1 BLPOP mylist 0
wait_for_blocked_clients_count 1 wait_for_blocked_clients_count 1
# pipline on other client a list push and a blocking pop # pipeline on other client a list push and a blocking pop
# we should expect the fainess to be kept and have $rd1 # we should expect the fairness to be kept and have $rd1
# being unblocked # being unblocked
set buf "" set buf ""
append buf "LPUSH mylist 1\r\n" append buf "LPUSH mylist 1\r\n"
@ -2256,7 +2256,7 @@ foreach {pop} {BLPOP BLMPOP_RIGHT} {
$rd3 close $rd3 close
} }
test "Blocking command acounted only once in commandstats" { test "Blocking command accounted only once in commandstats" {
# cleanup first # cleanup first
r del mylist r del mylist
@ -2279,7 +2279,7 @@ foreach {pop} {BLPOP BLMPOP_RIGHT} {
$rd close $rd close
} }
test "Blocking command acounted only once in commandstats after timeout" { test "Blocking command accounted only once in commandstats after timeout" {
# cleanup first # cleanup first
r del mylist r del mylist