From 4ea06f921a2593b2e6ba1584e6e923b4a8544578 Mon Sep 17 00:00:00 2001 From: naglera Date: Sun, 30 Jun 2024 15:34:58 +0000 Subject: [PATCH] Rename completeTaskRDBConnectionSyncRdbConn methods Signed-off-by: naglera --- src/replication.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/replication.c b/src/replication.c index 3ed8f58225..710b4bc72c 100644 --- a/src/replication.c +++ b/src/replication.c @@ -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 @@ -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; @@ -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 */ @@ -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) { @@ -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; }