Skip to content

Commit

Permalink
Fix multi dbs donot dbExpand when loading RDB
Browse files Browse the repository at this point in the history
  • Loading branch information
soloestoy committed Dec 6, 2023
1 parent 9ee1cc3 commit 3dcfad9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin
uint64_t dbid = 0;
int type, rdbver;
uint64_t db_size = 0, expires_size = 0;
int should_expand_db = 1;
int should_expand_db = 0;
redisDb *db = rdb_loading_ctx->dbarray+0;
char buf[1024];
int error;
Expand Down Expand Up @@ -3115,6 +3115,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin
goto eoferr;
if ((expires_size = rdbLoadLen(rdb,NULL)) == RDB_LENERR)
goto eoferr;
should_expand_db = 1;
continue; /* Read next opcode. */
} else if (type == RDB_OPCODE_SLOT_INFO) {
uint64_t slot_id, slot_size, expires_slot_size;
Expand Down

0 comments on commit 3dcfad9

Please sign in to comment.