slaveof will resync - even if already a slave #290

ghost opened this Issue Jan 8, 2012 · 1 comment


None yet
1 participant

ghost commented Jan 8, 2012

'slaveof' doesn't check if it's already a slave. That is:

slaveof 6379

followed by:

slaveof 6379

will cause the slave to attempt a new resync - although nothing actually changed.
Redis should check if an action is really needed - and do nothing if after the command is executed the state doesn't change.

antirez added a commit that referenced this issue Jan 16, 2012

Don't change the replication state if SLAVE OF is called with argumen…
…ts specifying the same master we are already connected with. This fixes issues #290.

This comment has been minimized.

Show comment Hide comment

antirez Jan 16, 2012


Fixed, thanks


antirez commented Jan 16, 2012

Fixed, thanks

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