It is permissible to call dictFind() while iterating
Former-commit-id: 43a598c145d5ea9f2c0b2a16f93f5a8cbb724e7e
This commit is contained in:
parent
6533428887
commit
5f1331cc3c
@ -269,7 +269,7 @@ bool redisDbPersistentDataSnapshot::iterate_threadsafe(std::function<bool(const
|
|||||||
// likely we'll detect races (but it won't gurantee it)
|
// likely we'll detect races (but it won't gurantee it)
|
||||||
volatile size_t celem = size();
|
volatile size_t celem = size();
|
||||||
|
|
||||||
dictIterator *di = dictGetIterator(m_pdict);
|
dictIterator *di = dictGetSafeIterator(m_pdict);
|
||||||
while((de = dictNext(di)) != nullptr)
|
while((de = dictNext(di)) != nullptr)
|
||||||
{
|
{
|
||||||
--celem;
|
--celem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user