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.
This commit is contained in:
antirez 2015-10-15 10:03:33 +02:00
parent 6ef80f4ed2
commit 8242d069f1

View File

@ -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 */