1. 04 Oct, 2013 2 commits
    • antirez's avatar
      Replication: install the write handler when reusing a cached master. · df0c9600
      antirez authored
      Sometimes when we resurrect a cached master after a successful partial
      resynchronization attempt, there is pending data in the output buffers
      of the client structure representing the master (likely REPLCONF ACK
      commands).
      
      If we don't reinstall the write handler, it will never be installed
      again by addReply*() family functions as they'll assume that if there is
      already data pending, the write handler is already installed.
      
      This bug caused some slaves after a successful partial sync to never
      send REPLCONF ACK, and continuously being detected as timing out by the
      master, with a disconnection / reconnection loop.
      df0c9600
    • antirez's avatar
      PSYNC: safer handling of PSYNC requests. · c8c1006c
      antirez authored
      There was a bug that over-esteemed the amount of backlog available,
      however this could only happen when a slave was asking for an offset
      that was in the "future" compared to the master replication backlog.
      
      Now this case is handled well and logged as an incident in the master
      log file.
      c8c1006c
  2. 03 Sep, 2013 1 commit
  3. 12 Aug, 2013 3 commits
  4. 28 Jul, 2013 1 commit
  5. 18 Jul, 2013 1 commit
  6. 12 Jul, 2013 1 commit
  7. 11 Jul, 2013 3 commits
  8. 26 Jun, 2013 3 commits
    • antirez's avatar
      Don't disconnect pre PSYNC replication clients for timeout. · cdf79c06
      antirez authored
      Clients using SYNC to replicate are older implementations, such as
      redis-cli --slave, and are not designed to acknowledge the master with
      REPLCONF ACK commands, so we don't have any feedback and should not
      disconnect them on timeout.
      cdf79c06
    • antirez's avatar
      Use the RSC to replicate EVALSHA unmodified. · 545fe0c3
      antirez authored
      This commit uses the Replication Script Cache in order to avoid
      translating EVALSHA into EVAL whenever possible for both the AOF and
      slaves.
      545fe0c3
    • antirez's avatar
      Replication of scripts as EVALSHA: sha1 caching implemented. · 9d894b1b
      antirez authored
      This code is only responsible to take an LRU-evicted fixed length cache
      of SHA1 that we are sure all the slaves received.
      
      In this commit only the implementation is provided, but the Redis core
      does not use it to actually send EVALSHA to slaves when possible.
      9d894b1b
  9. 31 May, 2013 1 commit
  10. 30 May, 2013 1 commit
  11. 27 May, 2013 5 commits
    • antirez's avatar
      Close connection with timedout slaves. · 308940aa
      antirez authored
      Now masters, using the time at which the last REPLCONF ACK was received,
      are able to explicitly disconnect slaves that are no longer responding.
      
      Previously the only chance was to see a very long output buffer, that
      was highly suboptimal.
      308940aa
    • antirez's avatar
      Send ACK to master once every second. · 45e6a402
      antirez authored
      ACKs can be also used as a base for synchronous replication. However in
      that case they'll be explicitly requested by the master when the client
      sends a request that needs to be replicated synchronously.
      45e6a402
    • antirez's avatar
      Don't ACK the master after every command. · a74f8fe1
      antirez authored
      Sending an ACK is now moved into the replicationSendAck() function.
      a74f8fe1
    • antirez's avatar
      0000d533
    • antirez's avatar
      REPLCONF ACK command. · 1e77b77d
      antirez authored
      This special command is used by the slave to inform the master the
      amount of replication stream it currently consumed.
      
      it does not return anything so that we not need to consume additional
      bandwidth needed by the master to reply something.
      
      The master can do a number of things knowing the amount of stream
      processed, such as understanding the "lag" in bytes of the slave, verify
      if a given command was already processed by the slave, and so forth.
      1e77b77d
  12. 27 Feb, 2013 1 commit
  13. 13 Feb, 2013 2 commits
  14. 12 Feb, 2013 12 commits
  15. 08 Feb, 2013 1 commit
  16. 05 Feb, 2013 2 commits
    • antirez's avatar
      5f7dff4d
    • charsyam's avatar
      Turn off TCP_NODELAY on the slave socket after SYNC. · 1d80acae
      charsyam authored
      Further details from @antirez:
      
      It was reported by @StopForumSpam on Twitter that the Redis replication
      link was strangely using multiple TCP packets for multiple commands.
      This wastes a lot of bandwidth and is due to the TCP_NODELAY option we
      enable on the socket after accepting a new connection.
      
      However the master -> slave channel is a one-way channel since Redis
      replication is asynchronous, so there is no point in trying to reduce
      the latency, we should aim to reduce the bandwidth. For this reason this
      commit introduces the ability to disable the nagle algorithm on the
      socket after a successful SYNC.
      
      This feature is off by default because the delay can be up to 40
      milliseconds with normally configured Linux kernels.
      1d80acae