diff --git a/src/db.c b/src/db.c index 6cef5d734..0059af78a 100644 --- a/src/db.c +++ b/src/db.c @@ -2228,11 +2228,11 @@ int dbExpand(const redisDb *db, uint64_t db_size, dbKeyType keyType, int try_exp } int result = try_expand ? dictTryExpand(d, db_size) : dictExpand(d, db_size); if (try_expand && result == DICT_ERR) { - serverLog(LL_WARNING, "Dict expansion failed for type :%s slot: %d", + serverLog(LL_WARNING, "Dict expansion failed for db type: %s, slot: %d", keyType == DB_MAIN ? "main" : "expires", i); return C_ERR; } else if (result == DICT_ERR) { - serverLog(LL_DEBUG, "Dict expansion skipped for type :%s slot: %d", + serverLog(LL_DEBUG, "Dict expansion skipped for db type: %s, slot: %d", keyType == DB_MAIN ? "main" : "expires", i); } } diff --git a/src/rdb.c b/src/rdb.c index 88b455153..b50ea7867 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -3264,14 +3264,8 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin /* If there is no slot info, it means that it's either not cluster mode or we are trying to load legacy RDB file. * In this case we want to estimate number of keys per slot and resize accordingly. */ if (should_expand_db) { - if (dbExpand(db, db_size, DB_MAIN, 0) == C_ERR) { - serverLog(LL_WARNING, "OOM in dict expand of main dict"); - return C_ERR; - } - if (dbExpand(db, expires_size, DB_EXPIRES, 0) == C_ERR) { - serverLog(LL_WARNING, "OOM in dict expand of expire dict"); - return C_ERR; - } + dbExpand(db, db_size, DB_MAIN, 0); + dbExpand(db, expires_size, DB_EXPIRES, 0); should_expand_db = 0; }