| 3027 | } |
| 3028 | |
| 3029 | void redisDbPersistentData::commitChanges(const redisDbPersistentDataSnapshot **psnapshotFree) |
| 3030 | { |
| 3031 | if (m_pdbSnapshotStorageFlush) |
| 3032 | { |
| 3033 | dictIterator *di = dictGetIterator(m_dictChangedStorageFlush); |
| 3034 | dictEntry *de; |
| 3035 | while ((de = dictNext(di)) != nullptr) |
| 3036 | { |
| 3037 | serializeAndStoreChange(m_spstorage.get(), (redisDbPersistentData*)m_pdbSnapshotStorageFlush, (const char*)dictGetKey(de), (bool)dictGetVal(de)); |
| 3038 | } |
| 3039 | dictReleaseIterator(di); |
| 3040 | dictRelease(m_dictChangedStorageFlush); |
| 3041 | m_dictChangedStorageFlush = nullptr; |
| 3042 | *psnapshotFree = m_pdbSnapshotStorageFlush; |
| 3043 | m_pdbSnapshotStorageFlush = nullptr; |
| 3044 | } |
| 3045 | if (m_spstorage != nullptr) |
| 3046 | m_spstorage->endWriteBatch(); |
| 3047 | } |
| 3048 | |
| 3049 | redisDbPersistentData::~redisDbPersistentData() |
| 3050 | { |
no test coverage detected