From 84d056d0f742444819355d6018a2329ede838215 Mon Sep 17 00:00:00 2001 From: Huang Zhw Date: Sun, 14 Mar 2021 15:41:43 +0800 Subject: [PATCH] Fix typo and outdated comments. (#8640) --- src/aof.c | 2 +- src/module.c | 2 +- src/multi.c | 4 ++-- src/replication.c | 37 +++++++++++++++++++++++++++---------- src/rio.c | 4 ++-- src/server.h | 2 +- 6 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/aof.c b/src/aof.c index f1586cf90..237c4034c 100644 --- a/src/aof.c +++ b/src/aof.c @@ -1590,7 +1590,7 @@ int rewriteAppendOnlyFile(char *filename) { if (write(server.aof_pipe_write_ack_to_parent,"!",1) != 1) goto werr; if (anetNonBlock(NULL,server.aof_pipe_read_ack_from_parent) != ANET_OK) goto werr; - /* We read the ACK from the server using a 10 seconds timeout. Normally + /* We read the ACK from the server using a 5 seconds timeout. Normally * it should reply ASAP, but just in case we lose its reply, we are sure * the child will eventually get terminated. */ if (syncRead(server.aof_pipe_read_ack_from_parent,&byte,1,5000) != 1 || diff --git a/src/module.c b/src/module.c index d42207bbd..c602dbddd 100644 --- a/src/module.c +++ b/src/module.c @@ -606,7 +606,7 @@ void moduleHandlePropagationAfterCommandCallback(RedisModuleCtx *ctx) { * a transaction. */ if (!server.propagate_in_transaction) return; - /* If this command is executed from with Lua or MULTI/EXEC we do noy + /* If this command is executed from with Lua or MULTI/EXEC we do not * need to propagate EXEC */ if (server.in_eval || server.in_exec) return; diff --git a/src/multi.c b/src/multi.c index 5d690b71f..4abdb7499 100644 --- a/src/multi.c +++ b/src/multi.c @@ -140,7 +140,7 @@ void execCommandPropagateExec(int dbid) { } /* Aborts a transaction, with a specific error message. - * The transaction is always aboarted with -EXECABORT so that the client knows + * The transaction is always aborted with -EXECABORT so that the client knows * the server exited the multi state, but the actual reason for the abort is * included too. * Note: 'error' may or may not end with \r\n. see addReplyErrorFormat. */ @@ -202,7 +202,7 @@ void execCommand(client *c) { c->cmd = c->mstate.commands[j].cmd; /* ACL permissions are also checked at the time of execution in case - * they were changed after the commands were ququed. */ + * they were changed after the commands were queued. */ int acl_errpos; int acl_retval = ACLCheckCommandPerm(c,&acl_errpos); if (acl_retval == ACL_OK && c->cmd->proc == publishCommand) diff --git a/src/replication.c b/src/replication.c index 7bbba1a9e..79c6000ad 100644 --- a/src/replication.c +++ b/src/replication.c @@ -892,17 +892,34 @@ void syncCommand(client *c) { } /* REPLCONF