Skip to content

Commit

Permalink
more typos
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Jul 2, 2024
1 parent be75c86 commit 2065a43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4086,7 +4086,7 @@ void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request) {
}

/* This function returns the "rank" of this instance, a replica, in the context
* of its primar-replicas ring. The rank of the replica is given by the number of
* of its primary-replicas ring. The rank of the replica is given by the number of
* other replicas for the same primary that have a better replication offset
* compared to the local one (better means, greater, so they claim more data).
*
Expand Down Expand Up @@ -6022,7 +6022,7 @@ void clusterCommandSetSlot(client *c) {
* 3. Upon replication completion, primary B executes `SETSLOT n NODE B` and
* returns success to client C.
* 4. The following steps can happen in parallel:
* a. Client C issues `SETSLOT n NODE B` against parimary A.
* a. Client C issues `SETSLOT n NODE B` against primary A.
* b. Primary B gossips its new slot ownership to the cluster (including A, A', etc.).
*
* This ensures that all replicas have the latest topology information, enabling
Expand Down
6 changes: 3 additions & 3 deletions src/cluster_legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,18 +287,18 @@ struct _clusterNode {
uint16_t *slot_info_pairs; /* Slots info represented as (start/end) pair (consecutive index). */
int slot_info_pairs_count; /* Used number of slots in slot_info_pairs */
int numslots; /* Number of slots handled by this node */
int num_replicas; /* Number of replica nodes, if this is a primar */
int num_replicas; /* Number of replica nodes, if this is a primary */
clusterNode **replicas; /* pointers to replica nodes */
clusterNode *replicaof; /* pointer to the primary node. Note that it
may be NULL even if the node is a replica
if we don't have the parimary node in our
if we don't have the primary node in our
tables. */
unsigned long long last_in_ping_gossip; /* The number of the last carried in the ping gossip section */
mstime_t ping_sent; /* Unix time we sent latest ping */
mstime_t pong_received; /* Unix time we received the pong */
mstime_t data_received; /* Unix time we received any data */
mstime_t fail_time; /* Unix time when FAIL flag was set */
mstime_t voted_time; /* Last time we voted for a replica of this parimary */
mstime_t voted_time; /* Last time we voted for a replica of this primary */
mstime_t repl_offset_time; /* Unix time we received offset for this node */
mstime_t orphaned_time; /* Starting time of orphaned primary condition */
long long repl_offset; /* Last known repl offset for this node. */
Expand Down

0 comments on commit 2065a43

Please sign in to comment.