Fix dangling lock

Former-commit-id: 212e56984edfa3221c73b1d3c083efcd28f0dd25
This commit is contained in:
John Sully 2020-06-04 22:59:24 -04:00
parent 9204f7b629
commit a0e502684d

View File

@ -2519,7 +2519,11 @@ bool redisDbPersistentData::removeCachedValue(const char *key)
auto itr = m_setchanged.find(key);
if (itr != m_setchanged.end())
{
if (m_spstorage != nullptr)
m_spstorage->batch_unlock();
return false; // can't evict
}
// since we write ASAP the database already has a valid copy so safe to delete
dictDelete(m_pdict, key);