slaveof will resync - even if already a slave #290

Closed
ghost opened this Issue Jan 8, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@ghost

ghost commented Jan 8, 2012

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

slaveof 192.168.1.1 6379

followed by:

slaveof 192.168.1.1 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.
@antirez

This comment has been minimized.

Show comment Hide comment
@antirez

antirez Jan 16, 2012

Owner

Fixed, thanks

Owner

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