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. */
| 201 | * create a new empty set of hash tables and scheduling the old ones for |
| 202 | * lazy freeing. */ |
| 203 | void emptyDbAsync(redisDb *db) { |
| 204 | dict *oldht1 = db->dict, *oldht2 = db->expires; |
| 205 | db->dict = dictCreate(&dbDictType,NULL); |
| 206 | db->expires = dictCreate(&dbExpiresDictType,NULL); |
| 207 | atomicIncr(lazyfree_objects,dictSize(oldht1)); |
| 208 | bioCreateLazyFreeJob(lazyfreeFreeDatabase,2,oldht1,oldht2); |
| 209 | } |
| 210 | |
| 211 | /* Release the radix tree mapping Redis Cluster keys to slots asynchronously. */ |
| 212 | void freeSlotsToKeysMapAsync(rax *rt) { |
no test coverage detected