1. 02 11月, 2012 1 次提交
  2. 07 7月, 2012 1 次提交
    • A
      REPLCONF internal command introduced. · dbd8c753
      antirez 提交于
      The REPLCONF command is an internal command (not designed to be directly
      used by normal clients) that allows a slave to set some replication
      related state in the master before issuing SYNC to start the
      replication.
      
      The initial motivation for this command, and the only reason currently
      it is used by the implementation, is to let the slave instance
      communicate its listening port to the slave, so that the master can
      show all the slaves with their listening ports in the "replication"
      section of the INFO output.
      
      This allows clients to auto discover and query all the slaves attached
      into a master.
      
      Currently only a single option of the REPLCONF command is supported, and
      it is called "listening-port", so the slave now starts the replication
      process with something like the following chat:
      
          REPLCONF listening-prot 6380
          SYNC
      
      Note that this works even if the master is an older version of Redis and
      does not understand REPLCONF, because the slave ignores the REPLCONF
      error.
      
      In the future REPLCONF can be used for partial replication and other
      replication related features where there is the need to exchange
      information between master and slave.
      
      NOTE: This commit also fixes a bug: the INFO outout already carried
      information about slaves, but the port was broken, and was obtained
      with getpeername(2), so it was actually just the ephemeral port used
      by the slave to connect to the master as a client.
      dbd8c753
  3. 15 6月, 2012 1 次提交
    • A
      Fix c->reply_bytes computation in setDeferredMultiBulkLength() · 6fe9c402
      antirez 提交于
      In order to implement reply buffer limits introduced in 2.6 and useful
      to close the connection under user-selected circumastances of big output
      buffers (for instance slow consumers in pub/sub, a blocked slave, and so
      forth) Redis takes a counter with the amount of used memory in objects
      inside the output list stored into c->reply.
      
      The computation was broken in the function setDeferredMultiBulkLength(),
      in the case the object was glued with the next one. This caused the
      c->reply_bytes field to go out of sync, be subtracted more than needed,
      and wrap back near to ULONG_MAX values.
      
      This commit fixes this bug and adds an assertion that is able to trap
      this class of problems.
      
      This problem was discovered looking at the INFO output of an unrelated
      issue (issue #547).
      6fe9c402
  4. 07 4月, 2012 1 次提交
  5. 29 3月, 2012 2 次提交
  6. 28 3月, 2012 1 次提交
  7. 14 3月, 2012 5 次提交
  8. 07 3月, 2012 1 次提交
  9. 16 2月, 2012 1 次提交
  10. 08 2月, 2012 1 次提交
  11. 07 2月, 2012 1 次提交
  12. 06 2月, 2012 1 次提交
  13. 04 2月, 2012 2 次提交
    • A
      This fixes issue #327, is a very complex fix (unfortunately), details: · f6b32c14
      antirez 提交于
      1) sendReplyToClient() now no longer stops transferring data to a single
      client in the case we are out of memory (maxmemory-wise).
      
      2) in processCommand() the idea of we being out of memory is no longer
      the naive zmalloc_used_memory() > server.maxmemory. To say if we can
      accept or not write queries is up to the return value of
      freeMemoryIfNeeded(), that has full control about that.
      
      3) freeMemoryIfNeeded() now does its math without considering output
      buffers size. But at the same time it can't let the output buffers to
      put us too much outside the max memory limit, so at the same time it
      makes sure there is enough effort into delivering the output buffers to
      the slaves, calling the write handler directly.
      
      This three changes are the result of many tests, I found (partially
      empirically) that is the best way to address the problem, but maybe
      we'll find better solutions in the future.
      f6b32c14
    • A
      Use less memory when emitting the protocol, by using more shared objects for... · 355f8591
      antirez 提交于
      Use less memory when emitting the protocol, by using more shared objects for commonly emitted parts of the protocol.
      355f8591
  14. 26 1月, 2012 1 次提交
  15. 24 1月, 2012 5 次提交
  16. 23 1月, 2012 1 次提交
  17. 17 1月, 2012 2 次提交
  18. 12 1月, 2012 1 次提交
  19. 31 12月, 2011 2 次提交
  20. 21 12月, 2011 1 次提交
  21. 19 12月, 2011 1 次提交
  22. 28 11月, 2011 1 次提交
  23. 25 11月, 2011 1 次提交
  24. 24 11月, 2011 3 次提交
  25. 21 11月, 2011 2 次提交