mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
fix(rdb): Fix RDB load bug when loading hset
This commit is contained in:
parent
d3c848f97a
commit
7ed808d5d0
3 changed files with 33 additions and 22 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
extern "C" {
|
||||
#include "redis/crc64.h"
|
||||
#include "redis/redis_aux.h"
|
||||
#include "redis/zmalloc.h"
|
||||
}
|
||||
|
||||
|
@ -257,4 +258,15 @@ TEST_F(RdbTest, SaveManyDbs) {
|
|||
}
|
||||
}
|
||||
|
||||
TEST_F(RdbTest, HMapBugs) {
|
||||
// Force OBJ_ENCODING_HT encoding.
|
||||
server.hash_max_listpack_value = 0;
|
||||
Run({"hset", "hmap1", "key1", "val", "key2", "val2"});
|
||||
Run({"hset", "hmap2", "key1", string(690557, 'a')});
|
||||
|
||||
server.hash_max_listpack_value = 32;
|
||||
Run({"debug", "reload"});
|
||||
EXPECT_EQ(2, CheckedInt({"hlen", "hmap1"}));
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue