mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Fix typo and outdated comments. (#8640)
This commit is contained in:
parent
3a5905fa85
commit
84d056d0f7
@ -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 ||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
@ -892,17 +892,34 @@ void syncCommand(client *c) {
|
||||
}
|
||||
|
||||
/* REPLCONF <option> <value> <option> <value> ...
|
||||
* This command is used by a slave in order to configure the replication
|
||||
* This command is used by a replica in order to configure the replication
|
||||
* process before starting it with the SYNC command.
|
||||
* This command is also used by a master in order to get the replication
|
||||
* offset from a replica.
|
||||
*
|
||||
* Currently the only use of this command is to communicate to the master
|
||||
* what is the listening port of the Slave redis instance, so that the
|
||||
* master can accurately list slaves and their listening ports in
|
||||
* the INFO output.
|
||||
* Currently we support these options:
|
||||
*
|
||||
* In the future the same command can be used in order to configure
|
||||
* the replication to initiate an incremental replication instead of a
|
||||
* full resync. */
|
||||
* - listening-port <port>
|
||||
* - ip-address <ip>
|
||||
* What is the listening ip and port of the Replica redis instance, so that
|
||||
* the master can accurately lists replicas and their listening ports in the
|
||||
* INFO output.
|
||||
*
|
||||
* - capa <eof|psync2>
|
||||
* What is the capabilities of this instance.
|
||||
* eof: supports EOF-style RDB transfer for diskless replication.
|
||||
* psync2: supports PSYNC v2, so understands +CONTINUE <new repl ID>.
|
||||
*
|
||||
* - ack <offset>
|
||||
* Replica informs the master the amount of replication stream that it
|
||||
* processed so far.
|
||||
*
|
||||
* - getack
|
||||
* Unlike other subcommands, this is used by master to get the replication
|
||||
* offset from a replica.
|
||||
*
|
||||
* - rdb-only
|
||||
* Only wants RDB snapshot without replication buffer. */
|
||||
void replconfCommand(client *c) {
|
||||
int j;
|
||||
|
||||
@ -3544,7 +3561,7 @@ void abortFailover(const char *err) {
|
||||
}
|
||||
|
||||
/*
|
||||
* FAILOVER [TO <HOST> <IP> [FORCE]] [ABORT] [TIMEOUT <timeout>]
|
||||
* FAILOVER [TO <HOST> <PORT> [FORCE]] [ABORT] [TIMEOUT <timeout>]
|
||||
*
|
||||
* This command will coordinate a failover between the master and one
|
||||
* of its replicas. The happy path contains the following steps:
|
||||
@ -3647,7 +3664,7 @@ void failoverCommand(client *c) {
|
||||
client *replica = findReplica(host, port);
|
||||
|
||||
if (replica == NULL) {
|
||||
addReplyError(c,"FAILOVER target HOST and IP is not "
|
||||
addReplyError(c,"FAILOVER target HOST and PORT is not "
|
||||
"a replica.");
|
||||
return;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ void rioInitWithFile(rio *r, FILE *fp) {
|
||||
}
|
||||
|
||||
/* ------------------- Connection implementation -------------------
|
||||
* We use this RIO implemetnation when reading an RDB file directly from
|
||||
* We use this RIO implementation when reading an RDB file directly from
|
||||
* the connection to the memory via rdbLoadRio(), thus this implementation
|
||||
* only implements reading from a connection that is, normally,
|
||||
* just a socket. */
|
||||
@ -262,7 +262,7 @@ void rioInitWithConn(rio *r, connection *conn, size_t read_limit) {
|
||||
sdsclear(r->io.conn.buf);
|
||||
}
|
||||
|
||||
/* Release the RIO tream. Optionally returns the unread buffered data
|
||||
/* Release the RIO stream. Optionally returns the unread buffered data
|
||||
* when the SDS pointer 'remaining' is passed. */
|
||||
void rioFreeConn(rio *r, sds *remaining) {
|
||||
if (remaining && (size_t)r->io.conn.pos < sdslen(r->io.conn.buf)) {
|
||||
|
@ -838,7 +838,7 @@ typedef struct {
|
||||
the flag ALLKEYS is set in the user. */
|
||||
list *channels; /* A list of allowed Pub/Sub channel patterns. If this
|
||||
field is NULL the user cannot mention any channel in a
|
||||
`PUBLISH` or [P][UNSUSBSCRIBE] command, unless the flag
|
||||
`PUBLISH` or [P][UNSUBSCRIBE] command, unless the flag
|
||||
ALLCHANNELS is set in the user. */
|
||||
} user;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user