Restarting DB After CONFIG SET and redis.conf mismatch can wipe out your DB and its slaves #972

Open
xonder opened this Issue Feb 26, 2013 · 2 comments

Comments

Projects
None yet
2 participants

xonder commented Feb 26, 2013

Just wanted to point out a tricky edge case you might hit that will clean your DB dry if your redis.conf doesn't match the settings you sent to the instance through config set.

Sure, it's a config error, but its rather devastating impact might warrant a disclaimer or some sort of checking mechanism.

Here are the steps to reproduce it:

-Launch your DB with AOF and dump writing enabled.
-Turn off the use of AOF using config set
-Your server reboots
-Redis restarts, loads the redis.conf file (which you forgot to update not to use AOF);
-Redis loads up the AOF as it was at the time you sent the config set
-Redis will at that point rewrite your dump file with that old data
-Propagates to ALL the slaves
-Sadness

Hi
I'm a newbie Redis user and I'm still moving the first steps on the codebase: would be nice to have an update on this issue; I just tried to reproduce the issue, turning off the appendonly field during an huge insertion of data and seems all works fine (no server reboot, aof and dump first enabled, so on) . What is the Redis version in use for reproducing this bug? I'm actually making some tests using the unstable branch.

xonder commented Jan 29, 2016

I believe that a couple versions ago, setting configs over config set
started propagating to the config file automatically.

On Thu, Jan 28, 2016 at 5:07 AM, Nico Liberato Candio <
notifications@github.com> wrote:

Hi
I'm a newbie Redis user and I'm still moving the first steps on the
codebase: would be nice to have an update on this issue; I just tried to
reproduce the issue, turning off the appendonly field during an huge
insertion of data and seems all works fine (no server reboot, aof and dump
first enabled, so on) . What is the Redis version in use for reproducing
this bug? I'm actually making some tests using the unstable branch.


Reply to this email directly or view it on GitHub
#972 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment