提交 072c91fe 编写于 作者: A antirez

PSYNC: another change to unexpected reply from PSYNC.

上级 0e1be534
......@@ -956,14 +956,11 @@ int slaveTryPartialResynchronization(int fd) {
if (!runid || !offset || (offset-runid-1) != REDIS_RUN_ID_SIZE) {
redisLog(REDIS_WARNING,
"Master replied with wrong +FULLRESYNC syntax.");
sdsfree(reply);
/* This is an unexpected condition, actually the +FULLRESYNC
* reply means that the master supports PSYNC, but the reply
* format seems wrong. To stay safe we blank the master
* runid to make sure next PSYNCs will fail, and return
* NOT_SUPPORTED to the caller to use SYNC instead. */
* runid to make sure next PSYNCs will fail. */
memset(server.repl_master_runid,0,REDIS_RUN_ID_SIZE+1);
return PSYNC_NOT_SUPPORTED;
} else {
memcpy(server.repl_master_runid, runid, offset-runid-1);
server.repl_master_runid[REDIS_RUN_ID_SIZE] = '\0';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册