Skip to content

Commit 0b159b3

Browse files
authored
Bump codespell to 2.2.4, fix typos and outupdated comments (redis#11911)
Fix some seen typos and wrong comments.
1 parent f8a5a4f commit 0b159b3

File tree

12 files changed

+23
-24
lines changed

12 files changed

+23
-24
lines changed

.codespell/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
codespell==2.2.2
1+
codespell==2.2.4

redis.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ zset-max-listpack-entries 128
19721972
zset-max-listpack-value 64
19731973

19741974
# HyperLogLog sparse representation bytes limit. The limit includes the
1975-
# 16 bytes header. When an HyperLogLog using the sparse representation crosses
1975+
# 16 bytes header. When a HyperLogLog using the sparse representation crosses
19761976
# this limit, it is converted into the dense representation.
19771977
#
19781978
# A value greater than 16000 is totally useless, since at that point the

src/blocked.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@ void blockPostponeClient(client *c) {
612612
/* Block client due to shutdown command */
613613
void blockClientShutdown(client *c) {
614614
blockClient(c, BLOCKED_SHUTDOWN);
615-
/* Mark this client to execute its command */
616615
}
617616

618617
/* Unblock a client once a specific key became available for it.

src/hyperloglog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
* In the example the sparse representation used just 7 bytes instead
145145
* of 12k in order to represent the HLL registers. In general for low
146146
* cardinality there is a big win in terms of space efficiency, traded
147-
* with CPU time since the sparse representation is slower to access:
147+
* with CPU time since the sparse representation is slower to access.
148148
*
149149
* The following table shows average cardinality vs bytes used, 100
150150
* samples per cardinality (when the set was not representable because

src/listpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ unsigned char *lpFind(unsigned char *lp, unsigned char *p, unsigned char *s,
732732
/* Skip entry */
733733
skipcnt--;
734734

735-
/* Move to next entry, avoid use `lpNext` due to `ASSERT_INTEGRITY` in
735+
/* Move to next entry, avoid use `lpNext` due to `lpAssertValidEntry` in
736736
* `lpNext` will call `lpBytes`, will cause performance degradation */
737737
p = lpSkip(p);
738738
}

src/networking.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,7 @@ int processPendingCommandAndInputBuffer(client *c) {
24582458
/* Now process client if it has more data in it's buffer.
24592459
*
24602460
* Note: when a master client steps into this function,
2461-
* it can always satisfy this condition, because its querbuf
2461+
* it can always satisfy this condition, because its querybuf
24622462
* contains data not applied. */
24632463
if (c->querybuf && sdslen(c->querybuf) > 0) {
24642464
return processInputBuffer(c);
@@ -4071,7 +4071,7 @@ static inline void setIOPendingCount(int i, unsigned long count) {
40714071
}
40724072

40734073
void *IOThreadMain(void *myid) {
4074-
/* The ID is the thread number (from 0 to server.iothreads_num-1), and is
4074+
/* The ID is the thread number (from 0 to server.io_threads_num-1), and is
40754075
* used by the thread to just manipulate a single sub-array of clients. */
40764076
long id = (unsigned long)myid;
40774077
char thdname[16];

src/script.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int scriptPrepareForRun(scriptRunCtx *run_ctx, client *engine_client, client *ca
160160
return C_ERR;
161161
}
162162

163-
/* Deny writes if we're unale to persist. */
163+
/* Deny writes if we're unable to persist. */
164164
int deny_write_type = writeCommandsDeniedByDiskError();
165165
if (deny_write_type != DISK_ERROR_TYPE_NONE && !obey_client) {
166166
if (deny_write_type == DISK_ERROR_TYPE_RDB)

src/server.c

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

src/server.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ struct redisObject {
895895
void *ptr;
896896
};
897897

898-
/* The a string name for an object's type as listed above
898+
/* The string name for an object's type as listed above
899899
* Native types are checked against the OBJ_STRING, OBJ_LIST, OBJ_* defines,
900900
* and Module types have their registered name returned. */
901901
char *getObjectTypeName(robj*);
@@ -929,7 +929,7 @@ typedef struct clientReplyBlock {
929929
* | / \
930930
* | / \
931931
* Repl Backlog Replica_A Replica_B
932-
*
932+
*
933933
* Each replica or replication backlog increments only the refcount of the
934934
* 'ref_repl_buf_node' which it points to. So when replica walks to the next
935935
* node, it should first increase the next node's refcount, and when we trim
@@ -1087,7 +1087,7 @@ typedef struct {
10871087
need more reserved IDs use UINT64_MAX-1,
10881088
-2, ... and so forth. */
10891089

1090-
/* Replication backlog is not separate memory, it just is one consumer of
1090+
/* Replication backlog is not a separate memory, it just is one consumer of
10911091
* the global replication buffer. This structure records the reference of
10921092
* replication buffers. Since the replication buffer block list may be very long,
10931093
* it would cost much time to search replication offset on partial resync, so
@@ -1223,7 +1223,7 @@ typedef struct client {
12231223
* unloaded for cleanup. Opaque for Redis Core.*/
12241224

12251225
/* If this client is in tracking mode and this field is non zero,
1226-
* invalidation messages for keys fetched by this client will be send to
1226+
* invalidation messages for keys fetched by this client will be sent to
12271227
* the specified client ID. */
12281228
uint64_t client_tracking_redirection;
12291229
rax *client_tracking_prefixes; /* A dictionary of prefixes we are already
@@ -1786,7 +1786,7 @@ struct redisServer {
17861786
char *rdb_pipe_buff; /* In diskless replication, this buffer holds data */
17871787
int rdb_pipe_bufflen; /* that was read from the rdb pipe. */
17881788
int rdb_key_save_delay; /* Delay in microseconds between keys while
1789-
* writing the RDB. (for testings). negative
1789+
* writing aof or rdb. (for testings). negative
17901790
* value means fractions of microseconds (on average). */
17911791
int key_load_delay; /* Delay in microseconds between keys while
17921792
* loading aof or rdb. (for testings). negative
@@ -1964,7 +1964,7 @@ struct redisServer {
19641964
REDISMODULE_CLUSTER_FLAG_*. */
19651965
int cluster_allow_reads_when_down; /* Are reads allowed when the cluster
19661966
is down? */
1967-
int cluster_config_file_lock_fd; /* cluster config fd, will be flock */
1967+
int cluster_config_file_lock_fd; /* cluster config fd, will be flocked. */
19681968
unsigned long long cluster_link_msg_queue_limit_bytes; /* Memory usage limit on individual link msg queue */
19691969
int cluster_drop_packet_filter; /* Debug config that allows tactically
19701970
* dropping packets of a specific type */

src/t_list.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ void lpushxCommand(client *c) {
526526
pushGenericCommand(c,LIST_HEAD,1);
527527
}
528528

529-
/* RPUSH <key> <element> [<element> ...] */
529+
/* RPUSHX <key> <element> [<element> ...] */
530530
void rpushxCommand(client *c) {
531531
pushGenericCommand(c,LIST_TAIL,1);
532532
}

0 commit comments

Comments
 (0)