Expire cycle: introduce the new state needed for the new algo.

This commit is contained in:
antirez
2019-11-14 18:27:37 +01:00
parent 8d50a8327e
commit 2f6fe5ce3a
4 changed files with 11 additions and 3 deletions

View File

@ -1077,10 +1077,12 @@ int dbSwapDatabases(long id1, long id2) {
db1->dict = db2->dict;
db1->expires = db2->expires;
db1->avg_ttl = db2->avg_ttl;
db1->expires_cursor = db2->expires_cursor;
db2->dict = aux.dict;
db2->expires = aux.expires;
db2->avg_ttl = aux.avg_ttl;
db2->expires_cursor = aux.expires_cursor;
/* Now we need to handle clients blocked on lists: as an effect
* of swapping the two DBs, a client that was waiting for list