summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-08-06 09:23:23 +0200
committerantirez <antirez@gmail.com>2015-08-06 09:23:23 +0200
commit3e6d4d599a07ec347ef2f77c6b292223e7be6a16 (patch)
tree52e3576f35401f361708726b060f6ef255d3f764 /src/networking.c
parent7ab3af0edc238c869827c185f997c0a99f4506b5 (diff)
downloadredis-slaves_capa.tar.gz
Replication: add REPLCONF CAPA EOF support.slaves_capa
Add the concept of slaves capabilities to Redis, the slave now presents to the Redis master with a set of capabilities in the form: REPLCONF capa SOMECAPA capa OTHERCAPA ... This has the effect of setting slave->slave_capa with the corresponding SLAVE_CAPA macros that the master can test later to understand if it the slave will understand certain formats and protocols of the replication process. This makes it much simpler to introduce new replication capabilities in the future in a way that don't break old slaves or masters. This patch was designed and implemented together with Oran Agra (@oranagra).
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 7a86bf80d..782dc6c4a 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -105,6 +105,7 @@ client *createClient(int fd) {
c->repl_ack_off = 0;
c->repl_ack_time = 0;
c->slave_listening_port = 0;
+ c->slave_capa = SLAVE_CAPA_NONE;
c->reply = listCreate();
c->reply_bytes = 0;
c->obuf_soft_limit_reached_time = 0;