summaryrefslogtreecommitdiff
path: root/src/expire.c
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2017-06-23 11:39:02 +0200
committerGitHub <noreply@github.com>2017-06-23 11:39:02 +0200
commit936ade80b2dc2019bfc2dc20de024ede91d6eacb (patch)
tree5437688a09fc65943061af062e7bfcf4b5d7faea /src/expire.c
parent8b768e8ea4a0616e71645e2e812803026765ba16 (diff)
parenta3e53cf9bcf05671e3ac4a170bb6791dbff62eec (diff)
downloadredis-936ade80b2dc2019bfc2dc20de024ede91d6eacb.tar.gz
Merge pull request #4028 from zintrepid/prevent_expirations_while_paused
Prevent expirations and evictions while paused
Diffstat (limited to 'src/expire.c')
-rw-r--r--src/expire.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/expire.c b/src/expire.c
index d3a0e3f69..14da78ec3 100644
--- a/src/expire.c
+++ b/src/expire.c
@@ -105,6 +105,10 @@ void activeExpireCycle(int type) {
int dbs_per_call = CRON_DBS_PER_CALL;
long long start = ustime(), timelimit;
+ /* We cannot expire keys while clients are paused as the dataset is
+ * supposed to be static. */
+ if (clientsArePaused()) return;
+
if (type == ACTIVE_EXPIRE_CYCLE_FAST) {
/* Don't start a fast cycle if the previous cycle did not exited
* for time limt. Also don't repeat a fast cycle for the same period