diff --git a/00-RELEASENOTES b/00-RELEASENOTES index 910f3a7e90bd45bf286203b7372f20d974fe1878..7234e29f913e19d66c5bcf5b7c71d858877b622a 100644 --- a/00-RELEASENOTES +++ b/00-RELEASENOTES @@ -12,6 +12,14 @@ for 2.0. CHANGELOG --------- +What's new in Redis 2.2.11 +========================== + +* Solved a never reported but possibly critical bug in the AOF and RDB +persistence, introduced with the new version of the iterator: In very rare +circumstances the AOF (after rerwite) or the rdb file may contain the same +key more than one time. + What's new in Redis 2.2.10 ========================== diff --git a/src/aof.c b/src/aof.c index 24ddec352c395cf3a7154bebf830de35d547ceef..e30c77f2921ae499c5c07886f6cb15d2aaf54be3 100644 --- a/src/aof.c +++ b/src/aof.c @@ -348,7 +348,7 @@ int rewriteAppendOnlyFile(char *filename) { redisDb *db = server.db+j; dict *d = db->dict; if (dictSize(d) == 0) continue; - di = dictGetIterator(d); + di = dictGetSafeIterator(d); if (!di) { fclose(fp); return REDIS_ERR; diff --git a/src/rdb.c b/src/rdb.c index 5e69a32443a31f673b9a825dc80492a739fbc15b..3e29a21e94b3bf37a42f76e0ce6185c35dafc3ea 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -427,7 +427,7 @@ int rdbSave(char *filename) { redisDb *db = server.db+j; dict *d = db->dict; if (dictSize(d) == 0) continue; - di = dictGetIterator(d); + di = dictGetSafeIterator(d); if (!di) { fclose(fp); return REDIS_ERR; diff --git a/src/version.h b/src/version.h index dab0a75a7b7a3819b8ca070982fe954b9f225ce6..8b6b4cca5069c724b79455f6289a78fc94b038cd 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define REDIS_VERSION "2.2.110" +#define REDIS_VERSION "2.2.111"