summaryrefslogtreecommitdiff
path: root/src/replication.c
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-06-10 20:39:33 +0800
committerGitHub <noreply@github.com>2021-06-10 15:39:33 +0300
commit0bfccc55e2df349104b34608365dc17db8e0a749 (patch)
tree1861554f79d98e4c5352d879b2e08979e69ba2f1 /src/replication.c
parent8a86bca5ed09094b561284fcb5b1fc416a4016dc (diff)
downloadredis-0bfccc55e2df349104b34608365dc17db8e0a749.tar.gz
Fixed some typos, add a spell check ci and others minor fix (#8890)
This PR adds a spell checker CI action that will fail future PRs if they introduce typos and spelling mistakes. This spell checker is based on blacklist of common spelling mistakes, so it will not catch everything, but at least it is also unlikely to cause false positives. Besides that, the PR also fixes many spelling mistakes and types, not all are a result of the spell checker we use. Here's a summary of other changes: 1. Scanned the entire source code and fixes all sorts of typos and spelling mistakes (including missing or extra spaces). 2. Outdated function / variable / argument names in comments 3. Fix outdated keyspace masks error log when we check `config.notify-keyspace-events` in loadServerConfigFromString. 4. Trim the white space at the end of line in `module.c`. Check: https://github.com/redis/redis/pull/7751 5. Some outdated https link URLs. 6. Fix some outdated comment. Such as: - In README: about the rdb, we used to said create a `thread`, change to `process` - dbRandomKey function coment (about the dictGetRandomKey, change to dictGetFairRandomKey) - notifyKeyspaceEvent fucntion comment (add type arg) - Some others minor fix in comment (Most of them are incorrectly quoted by variable names) 7. Modified the error log so that users can easily distinguish between TCP and TLS in `changeBindAddr`
Diffstat (limited to 'src/replication.c')
-rw-r--r--src/replication.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/replication.c b/src/replication.c
index bd0c6ca8c..7e27a9b56 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -789,7 +789,7 @@ void syncCommand(client *c) {
/* Increment stats for failed PSYNCs, but only if the
* replid is not "?", as this is used by slaves to force a full
- * resync on purpose when they are not albe to partially
+ * resync on purpose when they are not able to partially
* resync. */
if (master_replid[0] != '?') server.stat_sync_partial_err++;
}
@@ -870,7 +870,7 @@ void syncCommand(client *c) {
* in order to synchronize. */
serverLog(LL_NOTICE,"Current BGSAVE has socket target. Waiting for next BGSAVE for SYNC");
- /* CASE 3: There is no BGSAVE is progress. */
+ /* CASE 3: There is no BGSAVE is in progress. */
} else {
if (server.repl_diskless_sync && (c->slave_capa & SLAVE_CAPA_EOF) &&
server.repl_diskless_sync_delay)
@@ -1234,7 +1234,7 @@ void rdbPipeReadHandler(struct aeEventLoop *eventLoop, int fd, void *clientData,
}
serverLog(LL_WARNING,"Diskless rdb transfer, done reading from pipe, %d replicas still up.", stillUp);
/* Now that the replicas have finished reading, notify the child that it's safe to exit.
- * When the server detectes the child has exited, it can mark the replica as online, and
+ * When the server detects the child has exited, it can mark the replica as online, and
* start streaming the replication buffers. */
close(server.rdb_child_exit_pipe);
server.rdb_child_exit_pipe = -1;
@@ -1336,7 +1336,7 @@ void updateSlavesWaitingBgsave(int bgsaveerr, int type) {
*
* So things work like that:
*
- * 1. We end trasnferring the RDB file via socket.
+ * 1. We end transferring the RDB file via socket.
* 2. The replica is put ONLINE but the write handler
* is not installed.
* 3. The replica however goes really online, and pings us
@@ -1351,7 +1351,7 @@ void updateSlavesWaitingBgsave(int bgsaveerr, int type) {
* in advance). Detecting such final EOF string is much
* simpler and less CPU intensive if no more data is sent
* after such final EOF. So we don't want to glue the end of
- * the RDB trasfer with the start of the other replication
+ * the RDB transfer with the start of the other replication
* data. */
slave->replstate = SLAVE_STATE_ONLINE;
slave->repl_put_online_on_ack = 1;
@@ -1717,7 +1717,7 @@ void readSyncBulkPayload(connection *conn) {
* such case we want just to read the RDB file in memory. */
serverLog(LL_NOTICE, "MASTER <-> REPLICA sync: Flushing old data");
- /* We need to stop any AOF rewriting child before flusing and parsing
+ /* We need to stop any AOF rewriting child before flushing and parsing
* the RDB, otherwise we'll create a copy-on-write disaster. */
if (server.aof_state != AOF_OFF) stopAppendOnly();
@@ -2408,7 +2408,7 @@ void syncWithMaster(connection *conn) {
server.repl_state = REPL_STATE_SEND_PSYNC;
}
- /* Try a partial resynchonization. If we don't have a cached master
+ /* Try a partial resynchronization. If we don't have a cached master
* slaveTryPartialResynchronization() will at least try to use PSYNC
* to start a full resynchronization so that we get the master replid
* and the global offset, to try a partial resync at the next
@@ -2901,7 +2901,7 @@ void replicationCacheMaster(client *c) {
unlinkClient(c);
/* Reset the master client so that's ready to accept new commands:
- * we want to discard te non processed query buffers and non processed
+ * we want to discard the non processed query buffers and non processed
* offsets, including pending transactions, already populated arguments,
* pending outputs to the master. */
sdsclear(server.master->querybuf);
@@ -2935,13 +2935,13 @@ void replicationCacheMaster(client *c) {
replicationHandleMasterDisconnection();
}
-/* This function is called when a master is turend into a slave, in order to
+/* This function is called when a master is turned into a slave, in order to
* create from scratch a cached master for the new client, that will allow
* to PSYNC with the slave that was promoted as the new master after a
* failover.
*
* Assuming this instance was previously the master instance of the new master,
- * the new master will accept its replication ID, and potentiall also the
+ * the new master will accept its replication ID, and potential also the
* current offset if no data was lost during the failover. So we use our
* current replication ID and offset in order to synthesize a cached master. */
void replicationCacheMasterUsingMyself(void) {