1
0
mirror of https://github.com/fluencelabs/redis synced 2025-06-19 20:21:21 +00:00

Ability of slave to announce arbitrary ip/port to master.

This feature is useful, especially in deployments using Sentinel in
order to setup Redis HA, where the slave is executed with NAT or port
forwarding, so that the auto-detected port/ip addresses, as listed in
the "INFO replication" output of the master, or as provided by the
"ROLE" command, don't match the real addresses at which the slave is
reachable for connections.
This commit is contained in:
antirez
2016-07-27 16:41:20 +02:00
parent 356a6304ec
commit 55385f99de
6 changed files with 129 additions and 17 deletions

@ -109,6 +109,7 @@ client *createClient(int fd) {
c->repl_ack_off = 0;
c->repl_ack_time = 0;
c->slave_listening_port = 0;
c->slave_ip[0] = '\0';
c->slave_capa = SLAVE_CAPA_NONE;
c->reply = listCreate();
c->reply_bytes = 0;