Skip to content

Commit

Permalink
Rename wating rax to just wait
Browse files Browse the repository at this point in the history
Signed-off-by: naglera <[email protected]>
  • Loading branch information
naglera committed Jun 30, 2024
1 parent 4ea06f9 commit 01cc5e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3557,7 +3557,7 @@ int rdbSaveToReplicasSockets(int req, rdbSaveInfo *rsi) {
* to inform it with the save end offset.*/
sendCurrentOffsetToReplica(replica);
/* Make sure repl traffic is appended to the replication backlog */
addReplicaToPsyncWaitingRax(replica);
addReplicaToPsyncWait(replica);
} else {
server.rdb_pipe_numconns++;
}
Expand Down
10 changes: 5 additions & 5 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void rebaseReplicationBuffer(long long base_repl_offset) {
* On COB overrun, association is deleted and the RDB connection
* is dropped.
*/
void addReplicaToPsyncWaitingRax(client* replica) {
void addReplicaToPsyncWait(client* replica) {
listNode *ln = NULL;
replBufBlock *tail = NULL;
if (server.repl_backlog == NULL) {
Expand All @@ -230,7 +230,7 @@ void addReplicaToPsyncWaitingRax(client* replica) {
}

/* Attach waiting psync replicas with new replication backlog head. */
void addReplicaToPsyncWaitingRaxRetrospect(void) {
void addReplicaToPsyncWaitRetrospect(void) {
listNode *ln = listFirst(server.repl_buffer_blocks);
replBufBlock *head = ln ? listNodeValue(ln) : NULL;
raxIterator iter;
Expand All @@ -249,7 +249,7 @@ void addReplicaToPsyncWaitingRaxRetrospect(void) {
raxStop(&iter);
}

void removeReplicaFromPsyncWaitingRax(client* replica) {
void removeReplicaFromPsyncWait(client* replica) {
listNode *ln;
replBufBlock *o;
/* Get replBufBlock pointed by this replica */
Expand Down Expand Up @@ -462,7 +462,7 @@ void feedReplicationBuffer(char *s, size_t len) {
}
if (empty_backlog && raxSize(server.replicas_waiting_psync) > 0) {
/* Increase refcount for pending replicas. */
addReplicaToPsyncWaitingRaxRetrospect();
addReplicaToPsyncWaitRetrospect();
}

/* For output buffer of replicas. */
Expand Down Expand Up @@ -864,7 +864,7 @@ int primaryTryPartialResynchronization(client *c, long long psync_offset) {
c->flags |= CLIENT_REPLICA;
if (c->flags & CLIENT_REPL_MAIN_CONN && lookupRdbClientByID(c->associated_rdb_client_id)) {
c->repl_state = REPLICA_STATE_BG_RDB_LOAD;
removeReplicaFromPsyncWaitingRax(c);
removeReplicaFromPsyncWait(c);
} else {
c->repl_state = REPLICA_STATE_ONLINE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,7 @@ void abortFailover(const char *err);
const char *getFailoverStateString(void);
void abortRdbConnectionSync(void);
int sendCurrentOffsetToReplica(client* replica);
void addReplicaToPsyncWaitingRax(client* replica);
void addReplicaToPsyncWait(client* replica);

/* Generic persistence functions */
void startLoadingFile(size_t size, char *filename, int rdbflags);
Expand Down

0 comments on commit 01cc5e8

Please sign in to comment.