Empty a Redis DB asynchronously. What the function does actually is to * create a new empty set of hash tables and scheduling the old ones for * lazy freeing. */
| 215 | * create a new empty set of hash tables and scheduling the old ones for |
| 216 | * lazy freeing. */ |
| 217 | void redisDbPersistentData::emptyDbAsync() { |
| 218 | dict *oldht1 = m_pdict; |
| 219 | m_pdict = dictCreate(&dbDictType,this); |
| 220 | if (m_spstorage != nullptr) |
| 221 | m_spstorage->clearAsync(); |
| 222 | if (m_fTrackingChanges) |
| 223 | m_fAllChanged = true; |
| 224 | atomicIncr(lazyfree_objects,dictSize(oldht1)); |
| 225 | m_numexpires = 0; |
| 226 | bioCreateLazyFreeJob(lazyfreeFreeDatabase,2,oldht1,nullptr); |
| 227 | } |
| 228 | |
| 229 | /* Release the radix tree mapping Redis Cluster keys to slots asynchronously. */ |
| 230 | void freeSlotsToKeysMapAsync(rax *rt) { |
nothing calls this directly
no test coverage detected