1. 06 Aug, 2015 1 commit
  2. 05 Aug, 2015 1 commit
    • antirez's avatar
      Fix synchronous readline "\n" handling. · 7ab3af0e
      antirez authored
      Our function to read a line with a timeout handles newlines as requests
      to refresh the timeout, however the code kept subtracting the buffer
      size left every time a newline was received, for a bug in the loop
      logic. Fixed by this commit.
      7ab3af0e
  3. 04 Aug, 2015 1 commit
    • antirez's avatar
      PSYNC initial offset fix. · 292fec05
      antirez authored
      This commit attempts to fix a bug involving PSYNC and diskless
      replication (currently experimental) found by Yuval Inbar from Redis Labs
      and that was later found to have even more far reaching effects (the bug also
      exists when diskstore is off).
      
      The gist of the bug is that, a Redis master replies with +FULLRESYNC to
      a PSYNC attempt that fails and requires a full resynchronization.
      However, the baseline offset sent along with FULLRESYNC was always the
      current master replication offset. This is not ok, because there are
      many reasosn that may delay the RDB file creation. And... guess what,
      the master offset we communicate must be the one of the time the RDB
      was created. So for example:
      
      1) When the BGSAVE for replication is delayed since there is one
         already but is not good for replication.
      2) When the BGSAVE is not needed as we attach one currently ongoing.
      3) When because of diskless replication the BGSAVE is delayed.
      
      In all the above cases the PSYNC reply is wrong and the slave may
      reconnect later claiming to need a wrong offset: this may cause
      data curruption later.
      292fec05
  4. 27 Jul, 2015 1 commit
  5. 26 Jul, 2015 1 commit
  6. 16 Oct, 2014 1 commit
  7. 26 Jun, 2014 1 commit
  8. 02 May, 2012 1 commit
    • antirez's avatar
      syncio.c read / write functions reworked for correctness and performance. · af3853c3
      antirez authored
      The new implementation start reading / writing before blocking with
      aeWait(), likely the descriptor can accept writes or has buffered data
      inside and we can go faster, otherwise we get an error and wait.
      
      This change has effects on speed but also on correctness: on socket
      errors when we perform non blocking connect(2) write is performed ASAP
      and the error is returned ASAP before waiting.
      
      So the practical effect is that now a Redis slave is more available if it
      can not connect to the master, previously the slave continued to block on
      syncWrite() trying to send SYNC, and serving commands very slowly.
      af3853c3
  9. 31 Mar, 2012 1 commit
  10. 14 May, 2011 1 commit
  11. 29 Mar, 2011 1 commit
  12. 25 Oct, 2010 1 commit
  13. 24 Oct, 2010 1 commit