提交 c7d7d0a8 编写于 作者: A antirez

RDB version is no 4, because small hashes are now encoded as ziplists, so...

RDB version is no 4, because small hashes are now encoded as ziplists, so older versions of Redis will not understand this format.
上级 87faf906
......@@ -616,7 +616,7 @@ int rdbSave(char *filename) {
}
rioInitWithFile(&rdb,fp);
if (rdbWriteRaw(&rdb,"REDIS0003",9) == -1) goto werr;
if (rdbWriteRaw(&rdb,"REDIS0004",9) == -1) goto werr;
for (j = 0; j < server.dbnum; j++) {
redisDb *db = server.db+j;
......@@ -1023,7 +1023,7 @@ int rdbLoad(char *filename) {
return REDIS_ERR;
}
rdbver = atoi(buf+5);
if (rdbver < 1 || rdbver > 3) {
if (rdbver < 1 || rdbver > 4) {
fclose(fp);
redisLog(REDIS_WARNING,"Can't handle RDB format version %d",rdbver);
errno = EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册