1. 12 Feb, 2013 2 commits
    • antirez's avatar
      Use replicationFeedSlaves() to send PING to slaves. · 01c21f99
      antirez authored
      A Redis master sends PING commands to slaves from time to time: doing
      this ensures that even if absence of writes, the master->slave channel
      remains active and the slave can feel the master presence, instead of
      closing the connection for timeout.
      
      This commit changes the way PINGs are sent to slaves in order to use the
      standard interface used to replicate all the other commands, that is,
      the function replicationFeedSlaves().
      
      With this change the stream of commands sent to every slave is exactly
      the same regardless of their exact state (Transferring RDB for first
      synchronization or slave already online). With the previous
      implementation the PING was only sent to online slaves, with the result
      that the output stream from master to slaves was not identical for all
      the slaves: this is a problem if we want to implement partial resyncs in
      the future using a global replication stream offset.
      
      TL;DR: this commit should not change the behaviour in practical terms,
      but is just something in preparation for partial resynchronization
      support.
      01c21f99
    • antirez's avatar
      Emit SELECT to slaves in a centralized way. · 5a35e485
      antirez authored
      Before this commit every Redis slave had its own selected database ID
      state. This was not actually useful as the emitted stream of commands
      is identical for all the slaves.
      
      Now the the currently selected database is a global state that is set to
      -1 when a new slave is attached, in order to force the SELECT command to
      be re-emitted for all the slaves.
      
      This change is useful in order to implement replication partial
      resynchronization in the future, as makes sure that the stream of
      commands received by slaves, including SELECT commands, are exactly the
      same for every slave connected, at any time.
      
      In this way we could have a global offset that can identify a specific
      piece of the master -> slaves stream of commands.
      5a35e485
  2. 11 Feb, 2013 8 commits
  3. 08 Feb, 2013 1 commit
  4. 07 Feb, 2013 1 commit
  5. 05 Feb, 2013 7 commits
  6. 04 Feb, 2013 2 commits
  7. 29 Jan, 2013 2 commits
  8. 28 Jan, 2013 13 commits
  9. 23 Jan, 2013 1 commit
  10. 21 Jan, 2013 3 commits
    • antirez's avatar
      767a53aa
    • antirez's avatar
      UNSUBSCRIBE and PUNSUBSCRIBE: always provide a reply. · 3ff75e58
      antirez authored
      UNSUBSCRIBE and PUNSUBSCRIBE commands are designed to mass-unsubscribe
      the client respectively all the channels and patters if called without
      arguments.
      
      However when these functions are called without arguments, but there are
      no channels or patters we are subscribed to, the old behavior was to
      don't reply at all.
      
      This behavior is broken, as every command should always reply.
      Also it is possible that we are no longer subscribed to a channels but we
      are subscribed to patters or the other way around, and the client should
      be notified with the correct number of subscriptions.
      
      Also it is not pretty that sometimes we did not receive a reply at all
      in a redis-cli session from these commands, blocking redis-cli trying
      to read the reply.
      
      This fixes issue #714.
      3ff75e58
    • antirez's avatar
      Fixed a bug in memtest progress bar, that had no actual effects. · 850117a8
      antirez authored
      This closes issue #859, thanks to @erbenmo.
      850117a8