diff options
author | antirez <antirez@gmail.com> | 2015-10-15 10:03:33 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-10-15 10:22:13 +0200 |
commit | 8242d069f12f430d1087fc834e69973fef5d05a9 (patch) | |
tree | b654673478901ff7322321f68fc2ad5748edb033 | |
parent | 6ef80f4ed21c14a879166a96dda91733a48d895c (diff) | |
download | redis-8242d069f12f430d1087fc834e69973fef5d05a9.tar.gz |
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.
-rw-r--r-- | src/redis.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/redis.h b/src/redis.h index b7f4ce373..34692a952 100644 --- a/src/redis.h +++ b/src/redis.h @@ -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 */ |