mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
RDB hashes loading fixed removing the assertion that failed every time an HT-encoded hash was loaded.
This commit is contained in:
parent
79642420b0
commit
c3c856228d
@ -844,9 +844,10 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) {
|
|||||||
hashTypeConvert(o, REDIS_ENCODING_HT);
|
hashTypeConvert(o, REDIS_ENCODING_HT);
|
||||||
|
|
||||||
/* Load every field and value into the ziplist */
|
/* Load every field and value into the ziplist */
|
||||||
while (o->encoding == REDIS_ENCODING_ZIPLIST && len-- > 0) {
|
while (o->encoding == REDIS_ENCODING_ZIPLIST && len > 0) {
|
||||||
robj *field, *value;
|
robj *field, *value;
|
||||||
|
|
||||||
|
len--;
|
||||||
/* Load raw strings */
|
/* Load raw strings */
|
||||||
field = rdbLoadStringObject(rdb);
|
field = rdbLoadStringObject(rdb);
|
||||||
if (field == NULL) return NULL;
|
if (field == NULL) return NULL;
|
||||||
@ -869,9 +870,10 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Load remaining fields and values into the hash table */
|
/* Load remaining fields and values into the hash table */
|
||||||
while (o->encoding == REDIS_ENCODING_HT && len-- > 0) {
|
while (o->encoding == REDIS_ENCODING_HT && len > 0) {
|
||||||
robj *field, *value;
|
robj *field, *value;
|
||||||
|
|
||||||
|
len--;
|
||||||
/* Load encoded strings */
|
/* Load encoded strings */
|
||||||
field = rdbLoadEncodedStringObject(rdb);
|
field = rdbLoadEncodedStringObject(rdb);
|
||||||
if (field == NULL) return NULL;
|
if (field == NULL) return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user