1. 02 Oct, 2018 1 commit
  2. 30 Sep, 2018 2 commits
    • Bruce Merry's avatar
      Fix incorrect memory usage accounting in zrealloc · 8fd1031b
      Bruce Merry authored
      When HAVE_MALLOC_SIZE is false, each call to zrealloc causes used_memory
      to increase by PREFIX_SIZE more than it should, due to mis-matched
      accounting between the original zmalloc (which includes PREFIX size in
      its increment) and zrealloc (which misses it from its decrement).
      
      I've also supplied a command-line test to easily demonstrate the
      problem. It's not wired into the test framework, because I don't know
      TCL so I'm not sure how to automate it.
      8fd1031b
    • Oran Agra's avatar
      fix #5024 - commandstats for multi-exec were logged as EXEC. · f03aed3c
      Oran Agra authored
      this was broken a while back by ba9154d7
      the purpose of which was to fix commandstats for GEOADD
      f03aed3c
  3. 19 Sep, 2018 2 commits
  4. 12 Sep, 2018 1 commit
  5. 11 Sep, 2018 2 commits
  6. 05 Sep, 2018 3 commits
  7. 31 Aug, 2018 2 commits
    • antirez's avatar
      While the slave is busy, just accumulate master input. · 9ab91b8c
      antirez authored
      Processing command from the master while the slave is in busy state is
      not correct, however we cannot, also, just reply -BUSY to the
      replication stream commands from the master. The correct solution is to
      stop processing data from the master, but just accumulate the stream
      into the buffers and resume the processing later.
      
      Related to #5297.
      9ab91b8c
    • antirez's avatar
      Allow scripts to timeout on slaves as well. · f5b29c64
      antirez authored
      See reasoning in #5297.
      f5b29c64
  8. 29 Aug, 2018 2 commits
  9. 27 Aug, 2018 2 commits
  10. 14 Aug, 2018 1 commit
  11. 13 Aug, 2018 1 commit
  12. 03 Aug, 2018 1 commit
  13. 31 Jul, 2018 4 commits
  14. 30 Jul, 2018 3 commits
  15. 23 Jul, 2018 2 commits
  16. 20 Jul, 2018 2 commits
  17. 19 Jul, 2018 8 commits
  18. 17 Jul, 2018 1 commit
    • Oran Agra's avatar
      fix rare replication stream corruption with disk-based replication · d5559898
      Oran Agra authored
      The slave sends \n keepalive messages to the master while parsing the rdb,
      and later sends REPLCONF ACK once a second. rarely, the master recives both
      a linefeed char and a REPLCONF in the same read, \n*3\r\n$8\r\nREPLCONF\r\n...
      and it tries to trim two chars (\r\n) from the query buffer,
      trimming the '*' from *3\r\n$8\r\nREPLCONF\r\n...
      
      then the master tries to process a command starting with '3' and replies to
      the slave a bunch of -ERR and one +OK.
      although the slave silently ignores these (prints a log message), this corrupts
      the replication offset at the slave since the slave increases the replication
      offset, and the master did not.
      
      other than the fix in processInlineBuffer, i did several other improvments
      while hunting this very rare bug.
      
      - when redis replies with "unknown command" it includes a portion of the
        arguments, not just the command name. so it would be easier to understand
        what was recived, in my case, on the slave side,  it was -ERR, but
        the "arguments" were the interesting part (containing info on the error).
      - about a year ago i added code in addReplyErrorLength to print the error to
        the log in case of a reply to master (since this string isn't actually
        trasmitted to the master), now changed that block to print a similar log
        message to indicate an error being sent from the master to the slave.
        note that the slave is marked as CLIENT_SLAVE only after PSYNC was received,
        so this will not cause any harm for REPLCONF, and will only indicate problems
        that are gonna corrupt the replication stream anyway.
      - two places were c->reply was emptied, and i wanted to reset sentlen
        this is a precaution (i did not actually see such a problem), since a
        non-zero sentlen will cause corruption to be transmitted on the socket.
      d5559898