Fix race condition with IStorage batches

Former-commit-id: a2eabd044c9048662a63ff0f980ed947dc145912
This commit is contained in:
John Sully 2020-02-17 19:00:31 -05:00
parent 0adc93ab41
commit 4b12a63b3a
2 changed files with 0 additions and 3 deletions

View File

@ -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()

View File

@ -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