Skip to content

Commit

Permalink
Rename completeTaskRDBConnectionSyncRdbConn methods
Browse files Browse the repository at this point in the history
  • Loading branch information
naglera committed Jun 30, 2024
1 parent 4aea02c commit c725388
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ int cancelReplicationHandshake(int reconnect);
void syncWithPrimary(connection *conn);
void replicationSteadyStateInit(void);
void setupMainConnForPsync(connection *conn);
void completeTaskRDBConnectionSyncMainConn(connection *conn);
void completeTaskRDBConnectionSyncRdbConn(connection *conn);
void rdbConnectionSyncPsyncEstablished(connection *conn);
void rdbConnectionSyncRdbLoaded(connection *conn);
void replicationAbortSyncTransfer(void);

/* We take a global flag to remember if this instance generated an RDB
Expand Down Expand Up @@ -2337,7 +2337,7 @@ void readSyncBulkPayload(connection *conn) {
if (conn == server.repl_rdb_transfer_s) {
/* In case of full-sync using rdb connection, the primary client was already created for psync purposes
* Instead of creating a new client we will use the one created for partial sync */
completeTaskRDBConnectionSyncRdbConn(conn);
rdbConnectionSyncRdbLoaded(conn);
} else {
replicationCreatePrimaryClient(server.repl_transfer_s, rsi.repl_stream_db);
server.repl_state = REPL_STATE_CONNECTED;
Expand Down Expand Up @@ -2873,7 +2873,7 @@ void rdbConnectionSyncSuccess(void) {
/* Replication: Replica side.
* Main connection successfully established psync with primary. The 'conn' argument must be the main
* connection. Check whether the rdb connection has completed its part and act accordingly. */
void completeTaskRDBConnectionSyncMainConn(connection *conn) {
void rdbConnectionSyncPsyncEstablished(connection *conn) {
serverAssert(conn == server.repl_transfer_s && server.repl_state == REPL_STATE_RECEIVE_PSYNC_REPLY);
if (server.repl_rdb_conn_state < REPL_RDB_CONN_RDB_LOADED) {
/* RDB is still loading */
Expand All @@ -2897,7 +2897,7 @@ void completeTaskRDBConnectionSyncMainConn(connection *conn) {
/* Replication: Replica side.
* Rdb connection done loading rdb. The 'conn' argument must be the rdb connection. Check whether the
* main connection has completed its part and act accordingly. */
void completeTaskRDBConnectionSyncRdbConn(connection *conn) {
void rdbConnectionSyncRdbLoaded(connection *conn) {
serverAssert(conn == server.repl_rdb_transfer_s && server.repl_rdb_conn_state == REPL_RDB_CONN_RDB_LOAD);
/* RDB connection */
if (server.repl_state < REPL_STATE_TRANSFER) {
Expand Down Expand Up @@ -3201,7 +3201,7 @@ void setupMainConnForPsync(connection *conn) {
if (server.supervised_mode == SUPERVISED_SYSTEMD) {
serverCommunicateSystemd("STATUS=Primary <-> REPLICA sync: Partial Resynchronization accepted. Ready to accept connections in read-write mode.\n");
}
completeTaskRDBConnectionSyncMainConn(conn);
rdbConnectionSyncPsyncEstablished(conn);
return;
}

Expand Down

0 comments on commit c725388

Please sign in to comment.