mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
propagate key eviction to slaves and AOF, like for expires, so that replicas and AOFs are always consistent even in maxmemory mode.
This commit is contained in:
parent
be86082be4
commit
452229b6fb
@ -1564,6 +1564,7 @@ void freeMemoryIfNeeded(void) {
|
|||||||
/* Finally remove the selected key. */
|
/* Finally remove the selected key. */
|
||||||
if (bestkey) {
|
if (bestkey) {
|
||||||
robj *keyobj = createStringObject(bestkey,sdslen(bestkey));
|
robj *keyobj = createStringObject(bestkey,sdslen(bestkey));
|
||||||
|
propagateExpire(db,keyobj);
|
||||||
dbDelete(db,keyobj);
|
dbDelete(db,keyobj);
|
||||||
server.stat_evictedkeys++;
|
server.stat_evictedkeys++;
|
||||||
decrRefCount(keyobj);
|
decrRefCount(keyobj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user