diff --git a/sentinel.conf b/sentinel.conf index 8647379d8..1b0b4cadc 100644 --- a/sentinel.conf +++ b/sentinel.conf @@ -275,7 +275,7 @@ sentinel failover-timeout mymaster 180000 # # # -# is currently always "failover" +# is currently always "start" # is either "leader" or "observer" # # The arguments from-ip, from-port, to-ip, to-port are used to communicate diff --git a/src/cluster.c b/src/cluster.c index ba21024be..b7bfedad3 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1740,7 +1740,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc } /* When this function is called, there is a packet to process starting - * at node->rcvbuf. Releasing the buffer is up to the caller, so this + * at link->rcvbuf. Releasing the buffer is up to the caller, so this * function should just handle the higher level stuff of processing the * packet, modifying the cluster state if needed. * @@ -2499,7 +2499,8 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) { totlen += sizeof(clusterMsgDataUpdate); } hdr->totlen = htonl(totlen); - /* For PING, PONG, and MEET, fixing the totlen field is up to the caller. */ + /* For PING, PONG, MEET and other variable length messages fixing the + * totlen field is up to the caller. */ } /* Return non zero if the node is already present in the gossip section of the @@ -2650,7 +2651,7 @@ void clusterSendPing(clusterLink *link, int type) { dictReleaseIterator(di); } - /* Ready to send... fix the totlen fiend and queue the message in the + /* Ready to send... fix the totlen field and queue the message in the * output buffer. */ totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); totlen += (sizeof(clusterMsgDataGossip)*gossipcount); @@ -3438,7 +3439,7 @@ void clusterHandleSlaveMigration(int max_slaves) { * the PAUSED flag, so that the slave will set mf_master_offset when receiving * a packet from the master with this flag set. * - * The gaol of the manual failover is to perform a fast failover without + * The goal of the manual failover is to perform a fast failover without * data loss due to the asynchronous master-slave replication. * -------------------------------------------------------------------------- */ diff --git a/src/replication.c b/src/replication.c index 8177eb073..8b263e0a4 100644 --- a/src/replication.c +++ b/src/replication.c @@ -770,8 +770,8 @@ void syncCommand(client *c) { /* Try a partial resynchronization if this is a PSYNC command. * If it fails, we continue with usual full resynchronization, however - * when this happens masterTryPartialResynchronization() already - * replied with: + * when this happens replicationSetupSlaveForFullResync will replied + * with: * * +FULLRESYNC * @@ -1055,7 +1055,7 @@ void removeRDBUsedToSyncReplicas(void) { * RDBGeneratedByReplication flag in case it was set. Otherwise if the * feature was enabled, but gets disabled later with CONFIG SET, the * flag may remain set to one: then next time the feature is re-enabled - * via CONFIG SET we have have it set even if no RDB was generated + * via CONFIG SET we have it set even if no RDB was generated * because of replication recently. */ if (!server.rdb_del_sync_files) { RDBGeneratedByReplication = 0; @@ -2149,7 +2149,7 @@ int slaveTryPartialResynchronization(connection *conn, int read_reply) { "Successful partial resynchronization with master."); /* Check the new replication ID advertised by the master. If it - * changed, we need to set the new ID as primary ID, and set or + * changed, we need to set the new ID as primary ID, and set * secondary ID as the old master ID up to the current offset, so * that our sub-slaves will be able to PSYNC with us after a * disconnection. */ @@ -2676,11 +2676,7 @@ void replicationUnsetMaster(void) { /* When a slave is turned into a master, the current replication ID * (that was inherited from the master at synchronization time) is * used as secondary ID up to the current offset, and a new replication - * ID is created to continue with a new replication history. - * - * NOTE: this function MUST be called after we call - * freeClient(server.master), since there we adjust the replication - * offset trimming the final PINGs. See Github issue #7320. */ + * ID is created to continue with a new replication history. */ shiftReplicationId(); /* Disconnecting all the slaves is required: we need to inform slaves * of the replication ID change (see shiftReplicationId() call). However diff --git a/src/sentinel.c b/src/sentinel.c index 2721a145d..d7a965696 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1019,7 +1019,7 @@ void sentinelPendingScriptsCommand(client *c) { * * It is called every time a failover is performed. * - * is currently always "failover". + * is currently always "start". * is either "leader" or "observer". * * from/to fields are respectively master -> promoted slave addresses for @@ -1275,8 +1275,8 @@ void sentinelDisconnectCallback(const redisAsyncContext *c, int status) { * if SRI_SLAVE or SRI_SENTINEL is set then 'master' must be not NULL and the * instance is added into master->slaves or master->sentinels table. * - * If the instance is a slave or sentinel, the name parameter is ignored and - * is created automatically as hostname:port. + * If the instance is a slave, the name parameter is ignored and is created + * automatically as ip/hostname:port. * * The function fails if hostname can't be resolved or port is out of range. * When this happens NULL is returned and errno is set accordingly to the @@ -4998,7 +4998,7 @@ void sentinelAbortFailover(sentinelRedisInstance *ri) { /* ======================== SENTINEL timer handler ========================== * This is the "main" our Sentinel, being sentinel completely non blocking - * in design. The function is called every second. + * in design. * -------------------------------------------------------------------------- */ /* Perform scheduled operations for the specified Redis instance. */