Eliminate unnecessary lookup in ensure when there is no snapshot

Former-commit-id: 1f363ed7c13c186f0c120ab4f3e321144667f50f
This commit is contained in:
John Sully 2021-03-26 23:44:42 +00:00
parent f0f4377822
commit 1da03185e6

View File

@ -2581,6 +2581,8 @@ void redisDbPersistentData::updateValue(dict_iter itr, robj *val)
void redisDbPersistentData::ensure(const char *key) void redisDbPersistentData::ensure(const char *key)
{ {
if (m_pdbSnapshot == nullptr && m_spstorage == nullptr)
return;
dictEntry *de = dictFind(m_pdict, key); dictEntry *de = dictFind(m_pdict, key);
ensure(key, &de); ensure(key, &de);
} }