From 6b2567298d809e74d6c17cf3bb6aab27342ceb5a Mon Sep 17 00:00:00 2001 From: John Sully Date: Thu, 1 Apr 2021 18:17:05 +0000 Subject: [PATCH] Don't ensure if we don't have to Former-commit-id: b7b678a3ada531890e67313c867b7b49b01fe41e --- src/db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.cpp b/src/db.cpp index 59eb08a68..39749f59d 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -2464,7 +2464,7 @@ void redisDb::storageProviderInitialize() bool redisDbPersistentData::insert(char *key, robj *o, bool fAssumeNew) { - if (!fAssumeNew) + if (!fAssumeNew && (g_pserver->m_pstorageFactory != nullptr || m_pdbSnapshot != nullptr)) ensure(key); int res = dictAdd(m_pdict, key, o); serverAssert(FImplies(fAssumeNew, res == DICT_OK));