Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
Signed-off-by: naglera <[email protected]>
  • Loading branch information
naglera committed Jun 26, 2024
1 parent f93f9d2 commit a838bdd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -4111,7 +4111,7 @@ void replicationDiscardCachedMaster(void) {
/* Replication: Replica side.
* This method performs the necessary steps to establish a connection with the master server.
* It sets private data, updates flags, and fires an event to notify modules about the master link change. */
void establishMasterConnection(void) {
void establishPrimaryConnection(void) {
connSetPrivateData(server.primary->conn, server.primary);
server.primary->flags &= ~(CLIENT_CLOSE_AFTER_REPLY|CLIENT_CLOSE_ASAP);
server.primary->flags |= CLIENT_AUTHENTICATED;
Expand All @@ -4133,10 +4133,10 @@ void establishMasterConnection(void) {
* primary left. */
void replicationResurrectCachedMaster(connection *conn) {
server.primary = server.cached_primary;
server.primary = NULL;
server.cached_primary = NULL;
server.primary->conn = conn;

establishMasterConnection();
establishPrimaryConnection();
/* Re-add to the list of clients. */
linkClient(server.primary);
replicationSteadyStateInit();
Expand Down Expand Up @@ -4172,7 +4172,7 @@ void replicationResurrectProvisionalMaster(void) {
memcpy(server.primary->replid, server.repl_provisional_master.replid, CONFIG_RUN_ID_SIZE);
server.primary->reploff = server.repl_provisional_master.reploff;
server.primary->read_reploff = server.repl_provisional_master.read_reploff;
establishMasterConnection();
establishPrimaryConnection();
}

/* ------------------------- MIN-REPLICAS-TO-WRITE --------------------------- */
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/repl-rdb-channel.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ start_server {tags {"repl rdb-channel external:skip"}} {
} else {
fail "Replica rdb connection is still open"
}
$master set foo 1
# wait for value to propegate to replica
wait_for_condition 50 1000 {
[$replica get foo] == 1
set offset [status $master master_repl_offset]
wait_for_condition 500 100 {
[string match "*slave0:*,offset=$offset,*" [$master info replication]] &&
$offset == [status $replica master_repl_offset]
} else {
fail "Replica isn't connected"
fail "Replicas and master offsets were unable to match."
}
}
}
Expand Down

0 comments on commit a838bdd

Please sign in to comment.