mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Improve comments of replicationCacheMasterUsingMyself().
This commit is contained in:
parent
61de1c1146
commit
c80d81c80a
@ -2725,9 +2725,14 @@ void replicationCacheMaster(client *c) {
|
||||
* current offset if no data was lost during the failover. So we use our
|
||||
* current replication ID and offset in order to synthesize a cached master. */
|
||||
void replicationCacheMasterUsingMyself(void) {
|
||||
/* This will be used to populate the field server.master->reploff
|
||||
* by replicationCreateMasterClient(). We'll later set the created
|
||||
* master as server.cached_master, so the replica will use such
|
||||
* offset for PSYNC. */
|
||||
server.master_initial_offset = server.master_repl_offset;
|
||||
|
||||
/* The master client we create can be set to any DBID, because
|
||||
* the new master will start its replication stream with SELECT. */
|
||||
server.master_initial_offset = server.master_repl_offset;
|
||||
replicationCreateMasterClient(NULL,-1);
|
||||
|
||||
/* Use our own ID / offset. */
|
||||
|
Loading…
Reference in New Issue
Block a user