1. 07 Oct, 2013 2 commits
  2. 04 Oct, 2013 3 commits
    • antirez's avatar
      Replication: install the write handler when reusing a cached master. · 1461422c
      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.
      1461422c
    • antirez's avatar
      Replication: fix master timeout. · b41570f7
      antirez authored
      Since we started sending REPLCONF ACK from slaves to masters, the
      lastinteraction field of the client structure is always refreshed as
      soon as there is room in the socket output buffer, so masters in timeout
      are detected with too much delay (the socket buffer takes a lot of time
      to be filled by small REPLCONF ACK <number> entries).
      
      This commit only counts data received as interactions with a master,
      solving the issue.
      b41570f7
    • antirez's avatar
      PSYNC: safer handling of PSYNC requests. · 37e06bd9
      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.
      37e06bd9
  3. 03 Oct, 2013 1 commit
    • antirez's avatar
      Cluster: new clusterDoBeforeSleep() API. · 7afc0dd5
      antirez authored
      The new API is able to remember operations to perform before returning
      to the event loop, such as checking if there is the failover quorum for
      a slave, save and fsync the configuraiton file, and so forth.
      
      Because this operations are performed before returning on the event
      loop we are sure that messages that are sent in the same event loop run
      will be delivered *after* the configuration is already saved, that is a
      requirement sometimes. For instance we want to publish a new epoch only
      when it is already stored in nodes.conf in order to avoid returning back
      in the logical clock when a node is restarted.
      
      This new API provides a big performance advantage compared to saving and
      possibly fsyncing the configuration file multiple times in the same
      event loop run, especially in the case of big clusters with tens or
      hundreds of nodes.
      7afc0dd5
  4. 02 Oct, 2013 3 commits
  5. 01 Oct, 2013 2 commits
  6. 30 Sep, 2013 8 commits
  7. 27 Sep, 2013 1 commit
  8. 26 Sep, 2013 4 commits
  9. 25 Sep, 2013 7 commits
  10. 20 Sep, 2013 2 commits
    • antirez's avatar
      Cluster: PFAIL -> FAIL transition allowed for slaves. · 3c9bb875
      antirez authored
      First change: now there is no need to be a master in order to detect a
      failure, however the majority of masters signaling PFAIL or FAIL is needed.
      
      This change is important because it allows slaves rejoining the cluster
      after a partition to sense the FAIL condition so that eventually all the
      nodes agree on failures.
      3c9bb875
    • antirez's avatar
      Cluster: added time field in cluster bus messages. · 925ea9f8
      antirez authored
      The time is sent in requests, and copied back in reply packets.
      This way the receiver can compare the time field in a reply with its
      local clock and check the age of the request associated with this reply.
      
      This is an easy way to discard delayed replies. Note that only a clock
      is used here, that is the one of the node sending the packet. The
      receiver only copies the field back into the reply, so no
      synchronization is needed between clocks of different hosts.
      925ea9f8
  11. 17 Sep, 2013 1 commit
  12. 04 Sep, 2013 6 commits