Commit 8242d069 authored by antirez's avatar antirez
Browse files

Make clear that slave handshake states must be ordered.

Make sure that people from the future will not break this rule.
Related to issue #2813.
parent 6ef80f4e
......@@ -272,6 +272,7 @@ typedef long long mstime_t; /* millisecond time type. */
#define REDIS_REPL_NONE 0 /* No active replication */
#define REDIS_REPL_CONNECT 1 /* Must connect to master */
#define REDIS_REPL_CONNECTING 2 /* Connecting to master */
/* --- Handshake states, must be ordered --- */
#define REDIS_REPL_RECEIVE_PONG 3 /* Wait for PING reply */
#define REDIS_REPL_SEND_AUTH 4 /* Send AUTH to master */
#define REDIS_REPL_RECEIVE_AUTH 5 /* Wait for AUTH reply */
......@@ -280,6 +281,7 @@ typedef long long mstime_t; /* millisecond time type. */
#define REDIS_REPL_SEND_CAPA 8 /* Send REPLCONF capa */
#define REDIS_REPL_RECEIVE_CAPA 9 /* Wait for REPLCONF reply */
#define REDIS_REPL_SEND_PSYNC 10 /* Send PSYNC */
/* --- End of handshake states --- */
#define REDIS_REPL_RECEIVE_PSYNC 11 /* Wait for PSYNC reply */
#define REDIS_REPL_TRANSFER 12 /* Receiving .rdb from master */
#define REDIS_REPL_CONNECTED 13 /* Connected to master */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment