It is permissible to call dictFind() while iterating

Former-commit-id: 43a598c145d5ea9f2c0b2a16f93f5a8cbb724e7e
This commit is contained in:
John Sully 2019-11-30 00:03:34 -05:00
parent 6533428887
commit 5f1331cc3c

View File

@ -269,7 +269,7 @@ bool redisDbPersistentDataSnapshot::iterate_threadsafe(std::function<bool(const
// likely we'll detect races (but it won't gurantee it)
volatile size_t celem = size();
dictIterator *di = dictGetIterator(m_pdict);
dictIterator *di = dictGetSafeIterator(m_pdict);
while((de = dictNext(di)) != nullptr)
{
--celem;