1. 10 9月, 2014 1 次提交
  2. 27 6月, 2014 1 次提交
  3. 21 6月, 2014 4 次提交
  4. 12 2月, 2014 1 次提交
  5. 05 2月, 2014 1 次提交
    • A
      Check for EAGAIN in sendBulkToSlave(). · 301a0cfc
      antirez 提交于
      Sometime an osx master with a Linux server over a slow link caused
      a strange error where osx called the writable function for
      the socket but actually apparently there was no room in the socket
      buffer to accept the write: write(2) call returned an EAGAIN error,
      that was not checked, so we considered write(2) == 0 always as a connection
      reset, which was unfortunate since the bulk transfer has to start again.
      
      Also more errors are logged with the WARNING level in the same code path
      now.
      301a0cfc
  6. 10 1月, 2014 1 次提交
  7. 08 1月, 2014 2 次提交
    • A
      Don't send REPLCONF ACK to old masters. · 2a1a31ca
      antirez 提交于
      Masters not understanding REPLCONF ACK will reply with errors to our
      requests causing a number of possible issues.
      
      This commit detects a global replication offest set to -1 at the end of
      the replication, and marks the client representing the master with the
      REDIS_PRE_PSYNC flag.
      
      Note that this flag was called REDIS_PRE_PSYNC_SLAVE but now it is just
      REDIS_PRE_PSYNC as it is used for both slaves and masters starting with
      this commit.
      
      This commit fixes issue #1488.
      2a1a31ca
    • A
      Clarify a comment in slaveTryPartialResynchronization(). · 418d3d35
      antirez 提交于
      418d3d35
  8. 22 12月, 2013 1 次提交
    • A
      Make new masters inherit replication offsets. · 4456ee11
      antirez 提交于
      Currently replication offsets could be used into a limited way in order
      to understand, out of a set of slaves, what is the one with the most
      updated data. For example this comparison is possible of N slaves
      were replicating all with the same master.
      
      However the replication offset was not transferred from master to slaves
      (that are later promoted as masters) in any way, so for instance if
      there were three instances A, B, C, with A master and B and C
      replication from A, the following could happen:
      
      C disconnects from A.
      B is turned into master.
      A is switched to master of B.
      B receives some write.
      
      In this context there was no way to compare the offset of A and C,
      because B would use its own local master replication offset as
      replication offset to initialize the replication with A.
      
      With this commit what happens is that when B is turned into master it
      inherits the replication offset from A, making A and C comparable.
      In the above case assuming no inconsistencies are created during the
      disconnection and failover process, A will show to have a replication
      offset greater than C.
      
      Note that this does not mean offsets are always comparable to understand
      what is, in a set of instances, since in more complex examples the
      replica with the higher replication offset could be partitioned away
      when picking the instance to elect as new master. However this in
      general improves the ability of a system to try to pick a good replica
      to promote to master.
      4456ee11
  9. 11 12月, 2013 3 次提交
    • A
      Slaves heartbeats during sync improved. · 563d6b3f
      antirez 提交于
      The previous fix for false positive timeout detected by master was not
      complete. There is another blocking stage while loading data for the
      first synchronization with the master, that is, flushing away the
      current data from the DB memory.
      
      This commit uses the newly introduced dict.c callback in order to make
      some incremental work (to send "\n" heartbeats to the master) while
      flushing the old data from memory.
      
      It is hard to write a regression test for this issue unfortunately. More
      support for debugging in the Redis core would be needed in terms of
      functionalities to simulate a slow DB loading / deletion.
      563d6b3f
    • A
      dict.c: added optional callback to dictEmpty(). · b6610a56
      antirez 提交于
      Redis hash table implementation has many non-blocking features like
      incremental rehashing, however while deleting a large hash table there
      was no way to have a callback called to do some incremental work.
      
      This commit adds this support, as an optiona callback argument to
      dictEmpty() that is currently called at a fixed interval (one time every
      65k deletions).
      b6610a56
    • A
      Log empty DB + Loading data into two separated messages. · 26cf5c8a
      antirez 提交于
      26cf5c8a
  10. 05 12月, 2013 1 次提交
  11. 28 11月, 2013 1 次提交
  12. 27 11月, 2013 1 次提交
  13. 11 11月, 2013 1 次提交
  14. 19 10月, 2013 1 次提交
  15. 04 10月, 2013 2 次提交
    • A
      Replication: install the write handler when reusing a cached master. · df0c9600
      antirez 提交于
      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
    • A
      PSYNC: safer handling of PSYNC requests. · c8c1006c
      antirez 提交于
      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
  16. 03 9月, 2013 1 次提交
  17. 12 8月, 2013 3 次提交
  18. 28 7月, 2013 1 次提交
  19. 22 7月, 2013 5 次提交
  20. 18 7月, 2013 1 次提交
  21. 13 7月, 2013 1 次提交
  22. 11 7月, 2013 3 次提交
  23. 26 6月, 2013 3 次提交
    • A
      Don't disconnect pre PSYNC replication clients for timeout. · cdf79c06
      antirez 提交于
      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
    • A
      Use the RSC to replicate EVALSHA unmodified. · 545fe0c3
      antirez 提交于
      This commit uses the Replication Script Cache in order to avoid
      translating EVALSHA into EVAL whenever possible for both the AOF and
      slaves.
      545fe0c3
    • A
      Replication of scripts as EVALSHA: sha1 caching implemented. · 9d894b1b
      antirez 提交于
      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