mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 17:40:50 +00:00
PSYNC: another change to unexpected reply from PSYNC.
This commit is contained in:
parent
0e1be5347b
commit
072c91fe13
@ -956,14 +956,11 @@ int slaveTryPartialResynchronization(int fd) {
|
|||||||
if (!runid || !offset || (offset-runid-1) != REDIS_RUN_ID_SIZE) {
|
if (!runid || !offset || (offset-runid-1) != REDIS_RUN_ID_SIZE) {
|
||||||
redisLog(REDIS_WARNING,
|
redisLog(REDIS_WARNING,
|
||||||
"Master replied with wrong +FULLRESYNC syntax.");
|
"Master replied with wrong +FULLRESYNC syntax.");
|
||||||
sdsfree(reply);
|
|
||||||
/* This is an unexpected condition, actually the +FULLRESYNC
|
/* This is an unexpected condition, actually the +FULLRESYNC
|
||||||
* reply means that the master supports PSYNC, but the reply
|
* reply means that the master supports PSYNC, but the reply
|
||||||
* format seems wrong. To stay safe we blank the master
|
* format seems wrong. To stay safe we blank the master
|
||||||
* runid to make sure next PSYNCs will fail, and return
|
* runid to make sure next PSYNCs will fail. */
|
||||||
* NOT_SUPPORTED to the caller to use SYNC instead. */
|
|
||||||
memset(server.repl_master_runid,0,REDIS_RUN_ID_SIZE+1);
|
memset(server.repl_master_runid,0,REDIS_RUN_ID_SIZE+1);
|
||||||
return PSYNC_NOT_SUPPORTED;
|
|
||||||
} else {
|
} else {
|
||||||
memcpy(server.repl_master_runid, runid, offset-runid-1);
|
memcpy(server.repl_master_runid, runid, offset-runid-1);
|
||||||
server.repl_master_runid[REDIS_RUN_ID_SIZE] = '\0';
|
server.repl_master_runid[REDIS_RUN_ID_SIZE] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user