diff --git a/src/cluster_legacy.c b/src/cluster_legacy.c index 1af7c472c..b3f8b539b 100644 --- a/src/cluster_legacy.c +++ b/src/cluster_legacy.c @@ -967,7 +967,7 @@ fmterr: * of the POSIX filesystem semantics, so that if the server is stopped * or crashes during the write, we'll end with either the old file or the * new one. Since we have the full payload to write available we can use - * a single write to write the whole file. If the pre-existing file was + * a single write to write the whole file. If the preexisting file was * bigger we pad our payload with newlines that are anyway ignored and truncate * the file afterward. */ int clusterSaveConfig(int do_fsync) { @@ -5905,7 +5905,7 @@ void clusterCron(void) { long long cluster_node_conn_attempts = maxConnectionAttemptsPerCron(); while ((de = dictNext(di)) != NULL) { clusterNode *node = dictGetVal(de); - /* We free the inbound or outboud link to the node if the link has an + /* We free the inbound or outbound link to the node if the link has an * oversized message send queue and immediately try reconnecting. */ clusterNodeCronFreeLinkOnBufferLimitReached(node); /* The protocol is that function(s) below return non-zero if the node was diff --git a/src/commands/README.md b/src/commands/README.md index 99867078a..555c1ff6b 100644 --- a/src/commands/README.md +++ b/src/commands/README.md @@ -179,7 +179,7 @@ Each element in this array is an object with the following keys: command line. The first key is the argument after the keyword. * `{"unknown": null}`: Finding the keys of this command is too complicated to explain. -* `"find_keys"`: How to find the remainnig keys of this key spec. It's an object +* `"find_keys"`: How to find the remaining keys of this key spec. It's an object on one of these forms: * `{"range": {"lastkey": LAST, "step": STEP, "limit": LIMIT}}`: A range of keys. * LAST: If LAST is positive, it's the index of the last key relative to the diff --git a/src/functions.c b/src/functions.c index fda376a27..2dc6b16fa 100644 --- a/src/functions.c +++ b/src/functions.c @@ -759,7 +759,7 @@ void functionRestoreCommand(client *c) { return; } - restorePolicy restore_replicy = restorePolicy_Append; /* default policy: APPEND */ + restorePolicy restore_policy = restorePolicy_Append; /* default policy: APPEND */ sds data = c->argv[2]->ptr; size_t data_len = sdslen(data); rio payload; @@ -768,11 +768,11 @@ void functionRestoreCommand(client *c) { if (c->argc == 4) { const char *restore_policy_str = c->argv[3]->ptr; if (!strcasecmp(restore_policy_str, "append")) { - restore_replicy = restorePolicy_Append; + restore_policy = restorePolicy_Append; } else if (!strcasecmp(restore_policy_str, "replace")) { - restore_replicy = restorePolicy_Replace; + restore_policy = restorePolicy_Replace; } else if (!strcasecmp(restore_policy_str, "flush")) { - restore_replicy = restorePolicy_Flush; + restore_policy = restorePolicy_Flush; } else { addReplyError(c, "Wrong restore policy given, value should be either FLUSH, APPEND or REPLACE."); return; @@ -811,11 +811,11 @@ void functionRestoreCommand(client *c) { } } - if (restore_replicy == restorePolicy_Flush) { + if (restore_policy == restorePolicy_Flush) { functionsLibCtxSwapWithCurrent(functions_lib_ctx, server.lazyfree_lazy_user_flush); functions_lib_ctx = NULL; /* avoid releasing the f_ctx in the end */ } else { - if (libraryJoin(curr_functions_lib_ctx, functions_lib_ctx, restore_replicy == restorePolicy_Replace, &err) != + if (libraryJoin(curr_functions_lib_ctx, functions_lib_ctx, restore_policy == restorePolicy_Replace, &err) != C_OK) { goto load_error; } diff --git a/src/geohash_helper.c b/src/geohash_helper.c index b64799c03..1a420ee68 100644 --- a/src/geohash_helper.c +++ b/src/geohash_helper.c @@ -349,7 +349,7 @@ int geohashGetDistanceIfInRectangle(double width_m, * The Polygon's centroid's lon lat coordinates are `centroidLon` and `centroidLat`. * The algorithm is based on PNPOLY - Point Inclusion in Polygon Test by W. Randolph Franklin (WRF). * See: https://wrfranklin.org/Research/Short_Notes/pnpoly.html - * Returns 1 if inside the polyon and returns 0 otherwise. */ + * Returns 1 if inside the polygon and returns 0 otherwise. */ int geohashGetDistanceIfInPolygon(double centroidLon, double centroidLat, double *point, double (*vertices)[2], int num_vertices, double *distance) { int i, j; int inside = 0; diff --git a/src/lzf_d.c b/src/lzf_d.c index ff32be892..b936771d2 100644 --- a/src/lzf_d.c +++ b/src/lzf_d.c @@ -160,7 +160,7 @@ lzf_decompress (const void *const in_data, size_t in_len, } else { - /* overlapping, use octte by octte copying */ + /* overlapping, use octet by octet copying */ do *op++ = *ref++; while (--len); diff --git a/src/module.c b/src/module.c index dfec1a907..3132ebe31 100644 --- a/src/module.c +++ b/src/module.c @@ -8383,7 +8383,7 @@ ValkeyModuleBlockedClient *VM_BlockClientOnAuth(ValkeyModuleCtx *ctx, return bc; } -/* Get the private data that was previusely set on a blocked client */ +/* Get the private data that was previously set on a blocked client */ void *VM_BlockClientGetPrivateData(ValkeyModuleBlockedClient *blocked_client) { return blocked_client->privdata; } diff --git a/src/quicklist.c b/src/quicklist.c index f5e09aee0..e5e5b68d2 100644 --- a/src/quicklist.c +++ b/src/quicklist.c @@ -1468,7 +1468,7 @@ void quicklistRotate(quicklist *quicklist) { /* If quicklist has only one node, the head listpack is also the * tail listpack and PushHead() could have reallocated our single listpack, - * which would make our pre-existing 'p' unusable. */ + * which would make our preexisting 'p' unusable. */ if (quicklist->len == 1) { p = lpSeek(quicklist->tail->entry, -1); } diff --git a/src/rax.c b/src/rax.c index dc22cc589..6691fe4ec 100644 --- a/src/rax.c +++ b/src/rax.c @@ -335,7 +335,7 @@ raxNode *raxAddChild(raxNode *n, unsigned char c, raxNode **childptr, raxNode ** /* Move the pointers to the left of the insertion position as well. Often * we don't need to do anything if there was already some padding to use. In * that case the final destination of the pointers will be the same, however - * in our example there was no pre-existing padding, so we added one byte + * in our example there was no preexisting padding, so we added one byte * plus three bytes of padding. After the next memmove() things will look * like that: * diff --git a/src/rio.c b/src/rio.c index b0142672c..b7c352059 100644 --- a/src/rio.c +++ b/src/rio.c @@ -335,10 +335,10 @@ static size_t rioFdWrite(rio *r, const void *buf, size_t len) { /* For small writes, we rather keep the data in user-space buffer, and flush * it only when it grows. however for larger writes, we prefer to flush - * any pre-existing buffer, and write the new one directly without reallocs + * any preexisting buffer, and write the new one directly without reallocs * and memory copying. */ if (len > PROTO_IOBUF_LEN) { - /* First, flush any pre-existing buffered data. */ + /* First, flush any preexisting buffered data. */ if (sdslen(r->io.fd.buf)) { if (rioFdWrite(r, NULL, 0) == 0) return 0; } diff --git a/src/server.c b/src/server.c index 6dfe153f0..a2d75e317 100644 --- a/src/server.c +++ b/src/server.c @@ -4748,7 +4748,7 @@ int finishShutdown(void) { rsiptr = rdbPopulateSaveInfo(&rsi); /* Keep the page cache since it's likely to restart soon */ if (rdbSave(REPLICA_REQ_NONE, server.rdb_filename, rsiptr, RDBFLAGS_KEEP_CACHE) != C_OK) { - /* Ooops.. error saving! The best we can do is to continue + /* Oops.. error saving! The best we can do is to continue * operating. Note that if there was a background saving process, * in the next cron() the server will be notified that the background * saving aborted, handling special stuff like replicas pending for diff --git a/src/t_stream.c b/src/t_stream.c index b953b84eb..2ef03e08e 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -3238,7 +3238,7 @@ void xclaimCommand(client *c) { * by the caller is satisfied by this entry. * * Note that the nack could be created by FORCE, in this - * case there was no pre-existing entry and minidle should + * case there was no preexisting entry and minidle should * be ignored, but in that case nack->consumer is NULL. */ if (nack->consumer && minidle) { mstime_t this_idle = now - nack->delivery_time; diff --git a/src/unit/test_rax.c b/src/unit/test_rax.c index 23fc3286c..951b56c2f 100644 --- a/src/unit/test_rax.c +++ b/src/unit/test_rax.c @@ -47,7 +47,7 @@ long long _ustime(void); /* From test_crc64combine.c */ * used in order to test the radix tree implementation against something that * will always "tell the truth" :-) */ -/* This is huge but we want it fast enough without reahshing needed. */ +/* This is huge but we want it fast enough without rehashing needed. */ #define HT_TABLE_SIZE 100000 typedef struct htNode { uint64_t keylen; diff --git a/src/valkey-check-aof.c b/src/valkey-check-aof.c index d64a6d416..fcfdc8090 100644 --- a/src/valkey-check-aof.c +++ b/src/valkey-check-aof.c @@ -477,10 +477,10 @@ void checkMultiPartAof(char *dirpath, char *manifest_filepath, int fix) { sds aof_filename = am->base_aof_info->file_name; sds aof_filepath = makePath(dirpath, aof_filename); last_file = ++aof_num == total_num; - int aof_preable = fileIsRDB(aof_filepath); + int aof_preamble = fileIsRDB(aof_filepath); - printf("Start to check BASE AOF (%s format).\n", aof_preable ? "RDB" : "RESP"); - ret = checkSingleAof(aof_filename, aof_filepath, last_file, fix, aof_preable); + printf("Start to check BASE AOF (%s format).\n", aof_preamble ? "RDB" : "RESP"); + ret = checkSingleAof(aof_filename, aof_filepath, last_file, fix, aof_preamble); printAofStyle(ret, aof_filename, (char *)"BASE AOF"); sdsfree(aof_filepath); } diff --git a/tests/cluster/cluster.tcl b/tests/cluster/cluster.tcl index 783465875..7527b453e 100644 --- a/tests/cluster/cluster.tcl +++ b/tests/cluster/cluster.tcl @@ -159,7 +159,7 @@ proc cluster_create_with_continuous_slots {masters slaves} { } -# Set the cluster node-timeout to all the reachalbe nodes. +# Set the cluster node-timeout to all the reachable nodes. proc set_cluster_node_timeout {to} { foreach_valkey_id id { catch {R $id CONFIG SET cluster-node-timeout $to} diff --git a/tests/instances.tcl b/tests/instances.tcl index bc3029a7c..4b41464ce 100644 --- a/tests/instances.tcl +++ b/tests/instances.tcl @@ -164,7 +164,7 @@ proc spawn_instance {type base_port count {conf {}} {base_conf_file ""}} { if {[server_is_up $::host $port 100] == 0} { set logfile [file join $dirname log.txt] puts [exec tail $logfile] - abort_sentinel_test "Problems starting $type #$j: ping timeout, maybe server start failed, check $logfile" + abort_sentinel_test "Problem starting $type #$j: ping timeout, maybe server start failed, check $logfile" } # Push the instance into the right list diff --git a/tests/unit/functions.tcl b/tests/unit/functions.tcl index 68936d5a2..bd11c4314 100644 --- a/tests/unit/functions.tcl +++ b/tests/unit/functions.tcl @@ -1020,7 +1020,7 @@ start_server {tags {"scripting"}} { r config set maxmemory 0 } {OK} {needs:config-maxmemory} - test {FUNCTION - verify allow-omm allows running any command} { + test {FUNCTION - verify allow-oom allows running any command} { r FUNCTION load replace {#!lua name=f1 server.register_function{ function_name='f1', diff --git a/tests/unit/tracking.tcl b/tests/unit/tracking.tcl index 4edc8573c..d679ff6ab 100644 --- a/tests/unit/tracking.tcl +++ b/tests/unit/tracking.tcl @@ -265,7 +265,7 @@ start_server {tags {"tracking network logreqres:skip"}} { assert_equal "PONG" [r ping] } - test {RESP3 Client gets tracking-redir-broken push message after cached key changed when rediretion client is terminated} { + test {RESP3 Client gets tracking-redir-broken push message after cached key changed when redirection client is terminated} { # make sure r is working resp 3 r HELLO 3 r CLIENT TRACKING on REDIRECT $redir_id diff --git a/tests/unit/type/stream-cgroups.tcl b/tests/unit/type/stream-cgroups.tcl index fe61d5de6..047defecf 100644 --- a/tests/unit/type/stream-cgroups.tcl +++ b/tests/unit/type/stream-cgroups.tcl @@ -47,7 +47,7 @@ start_server { r XADD mystream * a 1 r XADD mystream * b 2 # XREADGROUP should return only the new elements "a 1" "b 1" - # and not the element "foo bar" which was pre existing in the + # and not the element "foo bar" which was preexisting in the # stream (see previous test) set reply [ r XREADGROUP GROUP mygroup consumer-1 STREAMS mystream ">" diff --git a/tests/unit/type/stream.tcl b/tests/unit/type/stream.tcl index e8c07a2c7..de6ec4a76 100644 --- a/tests/unit/type/stream.tcl +++ b/tests/unit/type/stream.tcl @@ -1012,7 +1012,7 @@ start_server {tags {"stream"}} { assert_equal [dict get $reply max-deleted-entry-id] "2-0" } - test {XADD with artial ID with maximal seq} { + test {XADD with partial ID with maximal seq} { r DEL x r XADD x 1-18446744073709551615 f1 v1 assert_error {*The ID specified in XADD is equal or smaller*} {r XADD x 1-* f2 v2} diff --git a/valkey.conf b/valkey.conf index 1fa5415a8..d766d6625 100644 --- a/valkey.conf +++ b/valkey.conf @@ -691,7 +691,7 @@ dir ./ # is still in progress, the replica can act in two different ways: # # 1) if replica-serve-stale-data is set to 'yes' (the default) the replica will -# still reply to client requests, possibly with out of date data, or the +# still reply to client requests, possibly with out-of-date data, or the # data set may just be empty if this is the first synchronization. # # 2) If replica-serve-stale-data is set to 'no' the replica will reply with error