X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0a0f83ab2c02ebf1a9029a473e23ef72d037cac0..a54d9805ee1c46d574aab8e349fd778d3a4bc67b:/src/debug.c diff --git a/src/debug.c b/src/debug.c index d2d14cdb..c1fc26cf 100644 --- a/src/debug.c +++ b/src/debug.c @@ -181,6 +181,9 @@ void debugCommand(redisClient *c) { if (!server.ds_enabled) { addReplyError(c, "DEBUG FLUSHCACHE called with diskstore off."); return; + } else if (server.bgsavethread != (pthread_t) -1) { + addReplyError(c, "Can't flush cache while BGSAVE is in progress."); + return; } else { /* To flush the whole cache we need to wait for everything to * be flushed on disk... */