Unverified Commit 34f6d947 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #6074 from trevor211/fixActiveExpire

Do not active expire keys in the background when the switch is off.
parents 1e9b8d85 1c0913dc
...@@ -1674,10 +1674,12 @@ void clientsCron(void) { ...@@ -1674,10 +1674,12 @@ 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) {
activeExpireCycle(ACTIVE_EXPIRE_CYCLE_SLOW); if (server.masterhost == NULL) {
} else if (server.masterhost != NULL) { activeExpireCycle(ACTIVE_EXPIRE_CYCLE_SLOW);
expireSlaveKeys(); } else {
expireSlaveKeys();
}
} }
/* Defrag keys gradually. */ /* Defrag keys gradually. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment