Fix race condition with IStorage batches
Former-commit-id: a2eabd044c9048662a63ff0f980ed947dc145912
This commit is contained in:
parent
0adc93ab41
commit
4b12a63b3a
@ -2265,7 +2265,6 @@ redisDbPersistentData::changelist redisDbPersistentData::processChanges()
|
|||||||
serverAssert(m_fTrackingChanges >= 0);
|
serverAssert(m_fTrackingChanges >= 0);
|
||||||
changelist vecRet;
|
changelist vecRet;
|
||||||
|
|
||||||
fastlock_lock(&m_lockStorage);
|
|
||||||
if (m_spstorage != nullptr)
|
if (m_spstorage != nullptr)
|
||||||
{
|
{
|
||||||
m_spstorage->beginWriteBatch();
|
m_spstorage->beginWriteBatch();
|
||||||
@ -2305,7 +2304,6 @@ void redisDbPersistentData::commitChanges(const changelist &vec)
|
|||||||
}
|
}
|
||||||
if (m_spstorage != nullptr)
|
if (m_spstorage != nullptr)
|
||||||
m_spstorage->endWriteBatch();
|
m_spstorage->endWriteBatch();
|
||||||
fastlock_unlock(&m_lockStorage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redisDbPersistentData::~redisDbPersistentData()
|
redisDbPersistentData::~redisDbPersistentData()
|
||||||
|
@ -1358,7 +1358,6 @@ private:
|
|||||||
std::unique_ptr<redisDbPersistentDataSnapshot> m_spdbSnapshotHOLDER;
|
std::unique_ptr<redisDbPersistentDataSnapshot> m_spdbSnapshotHOLDER;
|
||||||
const redisDbPersistentDataSnapshot *m_pdbSnapshotASYNC = nullptr;
|
const redisDbPersistentDataSnapshot *m_pdbSnapshotASYNC = nullptr;
|
||||||
int m_refCount = 0;
|
int m_refCount = 0;
|
||||||
fastlock m_lockStorage { "storage" };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class redisDbPersistentDataSnapshot : protected redisDbPersistentData
|
class redisDbPersistentDataSnapshot : protected redisDbPersistentData
|
||||||
|
Loading…
x
Reference in New Issue
Block a user