Merge pull request #6074 from trevor211/fixActiveExpire
Do not active expire keys in the background when the switch is off.
This commit is contained in:
commit
2395eeb6e0
@ -1674,11 +1674,13 @@ void clientsCron(void) {
|
|||||||
void databasesCron(void) {
|
void databasesCron(void) {
|
||||||
/* Expire keys by random sampling. Not required for slaves
|
/* Expire keys by random sampling. Not required for slaves
|
||||||
* as master will synthesize DELs for us. */
|
* as master will synthesize DELs for us. */
|
||||||
if (server.active_expire_enabled && server.masterhost == NULL) {
|
if (server.active_expire_enabled) {
|
||||||
|
if (server.masterhost == NULL) {
|
||||||
activeExpireCycle(ACTIVE_EXPIRE_CYCLE_SLOW);
|
activeExpireCycle(ACTIVE_EXPIRE_CYCLE_SLOW);
|
||||||
} else if (server.masterhost != NULL) {
|
} else {
|
||||||
expireSlaveKeys();
|
expireSlaveKeys();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Defrag keys gradually. */
|
/* Defrag keys gradually. */
|
||||||
if (server.active_defrag_enabled)
|
if (server.active_defrag_enabled)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user