X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0a0f83ab2c02ebf1a9029a473e23ef72d037cac0..3a73be752476f44dfb099863ac9424c2f27f2be0:/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... */