Unverified Commit 1c710385 authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

Squash merging 125 typo/grammar/comment/doc PRs (#7773)

List of squashed commits or PRs
===============================

commit 66801ea
Author: hwware <wen.hui.ware@gmail.com>
Date:   Mon Jan 13 00:54:31 2020 -0500

    typo fix in acl.c

commit 46f55db
Author: Itamar Haber <itamar@redislabs.com>
Date:   Sun Sep 6 18:24:11 2020 +0300

    Updates a couple of comments

    Specifically:

    * RM_AutoMemory completed instead of pointing to docs
    * Updated link to custom type doc

commit 61a2aa0
Author: xindoo <xindoo@qq.com>
Date:   Tue Sep 1 19:24:59 2020 +0800

    Correct errors in code comments

commit a5871d1
Author: yz1509 <pro-756@qq.com>
Date:   Tue Sep 1 18:36:06 2020 +0800

    fix typos in module.c

commit 41eede7
Author: bookug <bookug@qq.com>
Date:   Sat Aug 15 01:11:33 2020 +0800

    docs: fix typos in comments

commit c303c84
Author: lazy-snail <ws.niu@outlook.com>
Date:   Fri Aug 7 11:15:44 2020 +0800

    fix spelling in redis.conf

commit 1e...
parent 8ea131fc
...@@ -627,7 +627,7 @@ void hincrbyfloatCommand(client *c) { ...@@ -627,7 +627,7 @@ void hincrbyfloatCommand(client *c) {
server.dirty++; server.dirty++;
/* Always replicate HINCRBYFLOAT as an HSET command with the final value /* Always replicate HINCRBYFLOAT as an HSET command with the final value
* in order to make sure that differences in float pricision or formatting * in order to make sure that differences in float precision or formatting
* will not create differences in replicas or after an AOF restart. */ * will not create differences in replicas or after an AOF restart. */
robj *aux, *newobj; robj *aux, *newobj;
aux = createStringObject("HSET",4); aux = createStringObject("HSET",4);
......
...@@ -722,7 +722,7 @@ void rpoplpushCommand(client *c) { ...@@ -722,7 +722,7 @@ void rpoplpushCommand(client *c) {
* Blocking POP operations * Blocking POP operations
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
/* This is a helper function for handleClientsBlockedOnKeys(). It's work /* This is a helper function for handleClientsBlockedOnKeys(). Its work
* is to serve a specific client (receiver) that is blocked on 'key' * is to serve a specific client (receiver) that is blocked on 'key'
* in the context of the specified 'db', doing the following: * in the context of the specified 'db', doing the following:
* *
...@@ -807,7 +807,7 @@ void blockingPopGenericCommand(client *c, int where) { ...@@ -807,7 +807,7 @@ void blockingPopGenericCommand(client *c, int where) {
return; return;
} else { } else {
if (listTypeLength(o) != 0) { if (listTypeLength(o) != 0) {
/* Non empty list, this is like a non normal [LR]POP. */ /* Non empty list, this is like a normal [LR]POP. */
char *event = (where == LIST_HEAD) ? "lpop" : "rpop"; char *event = (where == LIST_HEAD) ? "lpop" : "rpop";
robj *value = listTypePop(o,where); robj *value = listTypePop(o,where);
serverAssert(value != NULL); serverAssert(value != NULL);
...@@ -843,7 +843,7 @@ void blockingPopGenericCommand(client *c, int where) { ...@@ -843,7 +843,7 @@ void blockingPopGenericCommand(client *c, int where) {
return; return;
} }
/* If the list is empty or the key does not exists we must block */ /* If the keys do not exist we must block */
blockForKeys(c,BLOCKED_LIST,c->argv + 1,c->argc - 2,timeout,NULL,NULL); blockForKeys(c,BLOCKED_LIST,c->argv + 1,c->argc - 2,timeout,NULL,NULL);
} }
......
...@@ -193,7 +193,7 @@ sds setTypeNextObject(setTypeIterator *si) { ...@@ -193,7 +193,7 @@ sds setTypeNextObject(setTypeIterator *si) {
} }
/* Return random element from a non empty set. /* Return random element from a non empty set.
* The returned element can be a int64_t value if the set is encoded * The returned element can be an int64_t value if the set is encoded
* as an "intset" blob of integers, or an SDS string if the set * as an "intset" blob of integers, or an SDS string if the set
* is a regular set. * is a regular set.
* *
...@@ -458,7 +458,7 @@ void spopWithCountCommand(client *c) { ...@@ -458,7 +458,7 @@ void spopWithCountCommand(client *c) {
dbDelete(c->db,c->argv[1]); dbDelete(c->db,c->argv[1]);
notifyKeyspaceEvent(NOTIFY_GENERIC,"del",c->argv[1],c->db->id); notifyKeyspaceEvent(NOTIFY_GENERIC,"del",c->argv[1],c->db->id);
/* Propagate this command as an DEL operation */ /* Propagate this command as a DEL operation */
rewriteClientCommandVector(c,2,shared.del,c->argv[1]); rewriteClientCommandVector(c,2,shared.del,c->argv[1]);
signalModifiedKey(c,c->db,c->argv[1]); signalModifiedKey(c,c->db,c->argv[1]);
server.dirty++; server.dirty++;
...@@ -692,7 +692,7 @@ void srandmemberWithCountCommand(client *c) { ...@@ -692,7 +692,7 @@ void srandmemberWithCountCommand(client *c) {
* In this case we create a set from scratch with all the elements, and * In this case we create a set from scratch with all the elements, and
* subtract random elements to reach the requested number of elements. * subtract random elements to reach the requested number of elements.
* *
* This is done because if the number of requsted elements is just * This is done because if the number of requested elements is just
* a bit less than the number of elements in the set, the natural approach * a bit less than the number of elements in the set, the natural approach
* used into CASE 3 is highly inefficient. */ * used into CASE 3 is highly inefficient. */
if (count*SRANDMEMBER_SUB_STRATEGY_MUL > size) { if (count*SRANDMEMBER_SUB_STRATEGY_MUL > size) {
......
...@@ -1196,7 +1196,7 @@ void xaddCommand(client *c) { ...@@ -1196,7 +1196,7 @@ void xaddCommand(client *c) {
int id_given = 0; /* Was an ID different than "*" specified? */ int id_given = 0; /* Was an ID different than "*" specified? */
long long maxlen = -1; /* If left to -1 no trimming is performed. */ long long maxlen = -1; /* If left to -1 no trimming is performed. */
int approx_maxlen = 0; /* If 1 only delete whole radix tree nodes, so int approx_maxlen = 0; /* If 1 only delete whole radix tree nodes, so
the maxium length is not applied verbatim. */ the maximum length is not applied verbatim. */
int maxlen_arg_idx = 0; /* Index of the count in MAXLEN, for rewriting. */ int maxlen_arg_idx = 0; /* Index of the count in MAXLEN, for rewriting. */
/* Parse options. */ /* Parse options. */
...@@ -1890,7 +1890,7 @@ NULL ...@@ -1890,7 +1890,7 @@ NULL
} }
} }
/* XSETID <stream> <groupname> <id> /* XSETID <stream> <id>
* *
* Set the internal "last ID" of a stream. */ * Set the internal "last ID" of a stream. */
void xsetidCommand(client *c) { void xsetidCommand(client *c) {
...@@ -1982,7 +1982,7 @@ cleanup: ...@@ -1982,7 +1982,7 @@ cleanup:
* *
* If start and stop are omitted, the command just outputs information about * If start and stop are omitted, the command just outputs information about
* the amount of pending messages for the key/group pair, together with * the amount of pending messages for the key/group pair, together with
* the minimum and maxium ID of pending messages. * the minimum and maximum ID of pending messages.
* *
* If start and stop are provided instead, the pending messages are returned * If start and stop are provided instead, the pending messages are returned
* with informations about the current owner, number of deliveries and last * with informations about the current owner, number of deliveries and last
......
...@@ -315,7 +315,7 @@ void msetGenericCommand(client *c, int nx) { ...@@ -315,7 +315,7 @@ void msetGenericCommand(client *c, int nx) {
} }
/* Handle the NX flag. The MSETNX semantic is to return zero and don't /* Handle the NX flag. The MSETNX semantic is to return zero and don't
* set anything if at least one key alerady exists. */ * set anything if at least one key already exists. */
if (nx) { if (nx) {
for (j = 1; j < c->argc; j += 2) { for (j = 1; j < c->argc; j += 2) {
if (lookupKeyWrite(c->db,c->argv[j]) != NULL) { if (lookupKeyWrite(c->db,c->argv[j]) != NULL) {
......
...@@ -245,7 +245,7 @@ int zslDelete(zskiplist *zsl, double score, sds ele, zskiplistNode **node) { ...@@ -245,7 +245,7 @@ int zslDelete(zskiplist *zsl, double score, sds ele, zskiplistNode **node) {
return 0; /* not found */ return 0; /* not found */
} }
/* Update the score of an elmenent inside the sorted set skiplist. /* Update the score of an element inside the sorted set skiplist.
* Note that the element must exist and must match 'score'. * Note that the element must exist and must match 'score'.
* This function does not update the score in the hash table side, the * This function does not update the score in the hash table side, the
* caller should take care of it. * caller should take care of it.
......
...@@ -134,7 +134,7 @@ void enableTracking(client *c, uint64_t redirect_to, uint64_t options, robj **pr ...@@ -134,7 +134,7 @@ void enableTracking(client *c, uint64_t redirect_to, uint64_t options, robj **pr
CLIENT_TRACKING_NOLOOP); CLIENT_TRACKING_NOLOOP);
c->client_tracking_redirection = redirect_to; c->client_tracking_redirection = redirect_to;
/* This may be the first client we ever enable. Crete the tracking /* This may be the first client we ever enable. Create the tracking
* table if it does not exist. */ * table if it does not exist. */
if (TrackingTable == NULL) { if (TrackingTable == NULL) {
TrackingTable = raxNew(); TrackingTable = raxNew();
......
{ {
<lzf_unitialized_hash_table> <lzf_uninitialized_hash_table>
Memcheck:Cond Memcheck:Cond
fun:lzf_compress fun:lzf_compress
} }
{ {
<lzf_unitialized_hash_table> <lzf_uninitialized_hash_table>
Memcheck:Value4 Memcheck:Value4
fun:lzf_compress fun:lzf_compress
} }
{ {
<lzf_unitialized_hash_table> <lzf_uninitialized_hash_table>
Memcheck:Value8 Memcheck:Value8
fun:lzf_compress fun:lzf_compress
} }
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
* Integer encoded as 24 bit signed (3 bytes). * Integer encoded as 24 bit signed (3 bytes).
* |11111110| - 2 bytes * |11111110| - 2 bytes
* Integer encoded as 8 bit signed (1 byte). * Integer encoded as 8 bit signed (1 byte).
* |1111xxxx| - (with xxxx between 0000 and 1101) immediate 4 bit integer. * |1111xxxx| - (with xxxx between 0001 and 1101) immediate 4 bit integer.
* Unsigned integer from 0 to 12. The encoded value is actually from * Unsigned integer from 0 to 12. The encoded value is actually from
* 1 to 13 because 0000 and 1111 can not be used, so 1 should be * 1 to 13 because 0000 and 1111 can not be used, so 1 should be
* subtracted from the encoded 4 bit value to obtain the right value. * subtracted from the encoded 4 bit value to obtain the right value.
...@@ -191,10 +191,10 @@ ...@@ -191,10 +191,10 @@
#include "redisassert.h" #include "redisassert.h"
#define ZIP_END 255 /* Special "end of ziplist" entry. */ #define ZIP_END 255 /* Special "end of ziplist" entry. */
#define ZIP_BIG_PREVLEN 254 /* Max number of bytes of the previous entry, for #define ZIP_BIG_PREVLEN 254 /* ZIP_BIG_PREVLEN - 1 is the max number of bytes of
the "prevlen" field prefixing each entry, to be the previous entry, for the "prevlen" field prefixing
represented with just a single byte. Otherwise each entry, to be represented with just a single byte.
it is represented as FE AA BB CC DD, where Otherwise it is represented as FE AA BB CC DD, where
AA BB CC DD are a 4 bytes unsigned integer AA BB CC DD are a 4 bytes unsigned integer
representing the previous entry len. */ representing the previous entry len. */
...@@ -317,7 +317,7 @@ unsigned int zipIntSize(unsigned char encoding) { ...@@ -317,7 +317,7 @@ unsigned int zipIntSize(unsigned char encoding) {
return 0; return 0;
} }
/* Write the encoidng header of the entry in 'p'. If p is NULL it just returns /* Write the encoding header of the entry in 'p'. If p is NULL it just returns
* the amount of bytes required to encode such a length. Arguments: * the amount of bytes required to encode such a length. Arguments:
* *
* 'encoding' is the encoding we are using for the entry. It could be * 'encoding' is the encoding we are using for the entry. It could be
...@@ -325,7 +325,7 @@ unsigned int zipIntSize(unsigned char encoding) { ...@@ -325,7 +325,7 @@ unsigned int zipIntSize(unsigned char encoding) {
* for single-byte small immediate integers. * for single-byte small immediate integers.
* *
* 'rawlen' is only used for ZIP_STR_* encodings and is the length of the * 'rawlen' is only used for ZIP_STR_* encodings and is the length of the
* srting that this entry represents. * string that this entry represents.
* *
* The function returns the number of bytes used by the encoding/length * The function returns the number of bytes used by the encoding/length
* header stored in 'p'. */ * header stored in 'p'. */
...@@ -951,7 +951,7 @@ unsigned char *ziplistMerge(unsigned char **first, unsigned char **second) { ...@@ -951,7 +951,7 @@ unsigned char *ziplistMerge(unsigned char **first, unsigned char **second) {
} else { } else {
/* !append == prepending to target */ /* !append == prepending to target */
/* Move target *contents* exactly size of (source - [END]), /* Move target *contents* exactly size of (source - [END]),
* then copy source into vacataed space (source - [END]): * then copy source into vacated space (source - [END]):
* [SOURCE - END, TARGET - HEADER] */ * [SOURCE - END, TARGET - HEADER] */
memmove(target + source_bytes - ZIPLIST_END_SIZE, memmove(target + source_bytes - ZIPLIST_END_SIZE,
target + ZIPLIST_HEADER_SIZE, target + ZIPLIST_HEADER_SIZE,
......
...@@ -133,7 +133,7 @@ static unsigned int zipmapEncodeLength(unsigned char *p, unsigned int len) { ...@@ -133,7 +133,7 @@ static unsigned int zipmapEncodeLength(unsigned char *p, unsigned int len) {
* zipmap. Returns NULL if the key is not found. * zipmap. Returns NULL if the key is not found.
* *
* If NULL is returned, and totlen is not NULL, it is set to the entire * If NULL is returned, and totlen is not NULL, it is set to the entire
* size of the zimap, so that the calling function will be able to * size of the zipmap, so that the calling function will be able to
* reallocate the original zipmap to make room for more entries. */ * reallocate the original zipmap to make room for more entries. */
static unsigned char *zipmapLookupRaw(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned int *totlen) { static unsigned char *zipmapLookupRaw(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned int *totlen) {
unsigned char *p = zm+1, *k = NULL; unsigned char *p = zm+1, *k = NULL;
......
# Failover stress test. # Failover stress test.
# In this test a different node is killed in a loop for N # In this test a different node is killed in a loop for N
# iterations. The test checks that certain properties # iterations. The test checks that certain properties
# are preseved across iterations. # are preserved across iterations.
source "../tests/includes/init-tests.tcl" source "../tests/includes/init-tests.tcl"
source "../../../tests/support/cli.tcl" source "../../../tests/support/cli.tcl"
...@@ -32,7 +32,7 @@ test "Enable AOF in all the instances" { ...@@ -32,7 +32,7 @@ test "Enable AOF in all the instances" {
} }
} }
# Return nno-zero if the specified PID is about a process still in execution, # Return non-zero if the specified PID is about a process still in execution,
# otherwise 0 is returned. # otherwise 0 is returned.
proc process_is_running {pid} { proc process_is_running {pid} {
# PS should return with an error if PID is non existing, # PS should return with an error if PID is non existing,
...@@ -45,7 +45,7 @@ proc process_is_running {pid} { ...@@ -45,7 +45,7 @@ proc process_is_running {pid} {
# #
# - N commands are sent to the cluster in the course of the test. # - N commands are sent to the cluster in the course of the test.
# - Every command selects a random key from key:0 to key:MAX-1. # - Every command selects a random key from key:0 to key:MAX-1.
# - The operation RPUSH key <randomvalue> is perforemd. # - The operation RPUSH key <randomvalue> is performed.
# - Tcl remembers into an array all the values pushed to each list. # - Tcl remembers into an array all the values pushed to each list.
# - After N/2 commands, the resharding process is started in background. # - After N/2 commands, the resharding process is started in background.
# - The test continues while the resharding is in progress. # - The test continues while the resharding is in progress.
......
...@@ -322,7 +322,7 @@ proc pause_on_error {} { ...@@ -322,7 +322,7 @@ proc pause_on_error {} {
puts "S <id> cmd ... arg Call command in Sentinel <id>." puts "S <id> cmd ... arg Call command in Sentinel <id>."
puts "R <id> cmd ... arg Call command in Redis <id>." puts "R <id> cmd ... arg Call command in Redis <id>."
puts "SI <id> <field> Show Sentinel <id> INFO <field>." puts "SI <id> <field> Show Sentinel <id> INFO <field>."
puts "RI <id> <field> Show Sentinel <id> INFO <field>." puts "RI <id> <field> Show Redis <id> INFO <field>."
puts "continue Resume test." puts "continue Resume test."
} else { } else {
set errcode [catch {eval $line} retval] set errcode [catch {eval $line} retval]
......
...@@ -16,7 +16,7 @@ start_server {tags {"repl"}} { ...@@ -16,7 +16,7 @@ start_server {tags {"repl"}} {
s 0 role s 0 role
} {slave} } {slave}
test {Test replication with parallel clients writing in differnet DBs} { test {Test replication with parallel clients writing in different DBs} {
after 5000 after 5000
stop_bg_complex_data $load_handle0 stop_bg_complex_data $load_handle0
stop_bg_complex_data $load_handle1 stop_bg_complex_data $load_handle1
......
...@@ -108,7 +108,7 @@ proc test {name code {okpattern undefined} {options undefined}} { ...@@ -108,7 +108,7 @@ proc test {name code {okpattern undefined} {options undefined}} {
return return
} }
# abort if test name in skiptests # abort if only_tests was set but test name is not included
if {[llength $::only_tests] > 0 && [lsearch $::only_tests $name] < 0} { if {[llength $::only_tests] > 0 && [lsearch $::only_tests $name] < 0} {
incr ::num_skipped incr ::num_skipped
send_data_packet $::test_server_fd skip $name send_data_packet $::test_server_fd skip $name
......
...@@ -471,7 +471,7 @@ proc signal_idle_client fd { ...@@ -471,7 +471,7 @@ proc signal_idle_client fd {
# The the_end function gets called when all the test units were already # The the_end function gets called when all the test units were already
# executed, so the test finished. # executed, so the test finished.
proc the_end {} { proc the_end {} {
# TODO: print the status, exit with the rigth exit code. # TODO: print the status, exit with the right exit code.
puts "\n The End\n" puts "\n The End\n"
puts "Execution time of different units:" puts "Execution time of different units:"
foreach {time name} $::clients_time_history { foreach {time name} $::clients_time_history {
...@@ -526,9 +526,10 @@ proc print_help_screen {} { ...@@ -526,9 +526,10 @@ proc print_help_screen {} {
"--stack-logging Enable OSX leaks/malloc stack logging." "--stack-logging Enable OSX leaks/malloc stack logging."
"--accurate Run slow randomized tests for more iterations." "--accurate Run slow randomized tests for more iterations."
"--quiet Don't show individual tests." "--quiet Don't show individual tests."
"--single <unit> Just execute the specified unit (see next option). this option can be repeated." "--single <unit> Just execute the specified unit (see next option). This option can be repeated."
"--verbose Increases verbosity."
"--list-tests List all the available test units." "--list-tests List all the available test units."
"--only <test> Just execute the specified test by test name. this option can be repeated." "--only <test> Just execute the specified test by test name. This option can be repeated."
"--skip-till <unit> Skip all units until (and including) the specified one." "--skip-till <unit> Skip all units until (and including) the specified one."
"--skipunit <unit> Skip one unit." "--skipunit <unit> Skip one unit."
"--clients <num> Number of test clients (default 16)." "--clients <num> Number of test clients (default 16)."
......
...@@ -72,7 +72,7 @@ start_server {tags {"expire"}} { ...@@ -72,7 +72,7 @@ start_server {tags {"expire"}} {
list [r persist foo] [r persist nokeyatall] list [r persist foo] [r persist nokeyatall]
} {0 0} } {0 0}
test {EXPIRE pricision is now the millisecond} { test {EXPIRE precision is now the millisecond} {
# This test is very likely to do a false positive if the # This test is very likely to do a false positive if the
# server is under pressure, so if it does not work give it a few more # server is under pressure, so if it does not work give it a few more
# chances. # chances.
......
...@@ -79,7 +79,7 @@ start_server {tags {"hll"}} { ...@@ -79,7 +79,7 @@ start_server {tags {"hll"}} {
} }
} }
test {Corrupted sparse HyperLogLogs are detected: Additionl at tail} { test {Corrupted sparse HyperLogLogs are detected: Additional at tail} {
r del hll r del hll
r pfadd hll a b c r pfadd hll a b c
r append hll "hello" r append hll "hello"
......
...@@ -533,7 +533,7 @@ start_server {tags {"scripting"}} { ...@@ -533,7 +533,7 @@ start_server {tags {"scripting"}} {
# Note: keep this test at the end of this server stanza because it # Note: keep this test at the end of this server stanza because it
# kills the server. # kills the server.
test {SHUTDOWN NOSAVE can kill a timedout script anyway} { test {SHUTDOWN NOSAVE can kill a timedout script anyway} {
# The server could be still unresponding to normal commands. # The server should be still unresponding to normal commands.
catch {r ping} e catch {r ping} e
assert_match {BUSY*} $e assert_match {BUSY*} $e
catch {r shutdown nosave} catch {r shutdown nosave}
......
Create-custer is a small script used to easily start a big number of Redis create-cluster is a small script used to easily start a big number of Redis
instances configured to run in cluster mode. Its main goal is to allow manual instances configured to run in cluster mode. Its main goal is to allow manual
testing in a condition which is not easy to replicate with the Redis cluster testing in a condition which is not easy to replicate with the Redis cluster
unit tests, for example when a lot of instances are needed in order to trigger unit tests, for example when a lot of instances are needed in order to trigger
......
...@@ -5,7 +5,7 @@ rehashing.c ...@@ -5,7 +5,7 @@ rehashing.c
Visually show buckets in the two hash tables between rehashings. Also stress Visually show buckets in the two hash tables between rehashings. Also stress
test getRandomKeys() implementation, that may actually disappear from test getRandomKeys() implementation, that may actually disappear from
Redis soon, however visualization some code is reusable in new bugs Redis soon, However the visualization code is reusable in new bugs
investigation. investigation.
Compile with: Compile with:
......
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