Eliminate unnecessary lookup in ensure when there is no snapshot

Former-commit-id: 04540531b95ebadf6d60c90c6681c11060eaf907
This commit is contained in:
John Sully 2021-03-26 23:44:42 +00:00
parent 352bde8d89
commit a66295ed98

View File

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