1. 22 May, 2014 1 commit
    • antirez's avatar
      Accept multiple clients per iteration. · f3d3c606
      antirez authored
      When the listening sockets readable event is fired, we have the chance
      to accept multiple clients instead of accepting a single one. This makes
      Redis more responsive when there is a mass-connect event (for example
      after the server startup), and in workloads where a connect-disconnect
      pattern is used often, so that multiple clients are waiting to be
      accepted continuously.
      
      As a side effect, this commit makes the LOADING, BUSY, and similar
      errors much faster to deliver to the client, making Redis more
      responsive when there is to return errors to inform the clients that the
      server is blocked in an not interruptible operation.
      f3d3c606
  2. 23 Apr, 2014 1 commit
  3. 10 Mar, 2014 1 commit
  4. 25 Jan, 2014 1 commit
  5. 25 Dec, 2013 1 commit
  6. 22 Dec, 2013 1 commit
  7. 20 Dec, 2013 1 commit
  8. 11 Dec, 2013 1 commit
  9. 10 Dec, 2013 2 commits
    • antirez's avatar
      Slaves heartbeat while loading RDB files. · 75bf5a4a
      antirez authored
      Starting with Redis 2.8 masters are able to detect timed out slaves,
      while before 2.8 only slaves were able to detect a timed out master.
      
      Now that timeout detection is bi-directional the following problem
      happens as described "in the field" by issue #1449:
      
      1) Master and slave setup with big dataset.
      2) Slave performs the first synchronization, or a full sync
         after a failed partial resync.
      3) Master sends the RDB payload to the slave.
      4) Slave loads this payload.
      5) Master detects the slave as timed out since does not receive back the
         REPLCONF ACK acknowledges.
      
      Here the problem is that the master has no way to know how much the
      slave will take to load the RDB file in memory. The obvious solution is
      to use a greater replication timeout setting, but this is a shame since
      for the 0.1% of operation time we are forced to use a timeout that is
      not what is suited for 99.9% of operation time.
      
      This commit tries to fix this problem with a solution that is a bit of
      an hack, but that modifies little of the replication internals, in order
      to be back ported to 2.8 safely.
      
      During the RDB loading time, we send the master newlines to avoid
      being sensed as timed out. This is the same that the master already does
      while saving the RDB file to still signal its presence to the slave.
      
      The single newline is used because:
      
      1) It can't desync the protocol, as it is only transmitted all or
      nothing.
      2) It can be safely sent while we don't have a client structure for the
      master or in similar situations just with write(2).
      75bf5a4a
    • antirez's avatar
      Handle inline requested terminated with just \n. · 8d0083ba
      antirez authored
      8d0083ba
  10. 05 Dec, 2013 1 commit
  11. 03 Dec, 2013 2 commits
  12. 04 Oct, 2013 1 commit
    • antirez's avatar
      Replication: fix master timeout. · d7fa6d9a
      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.
      d7fa6d9a
  13. 27 Aug, 2013 2 commits
  14. 12 Aug, 2013 1 commit
  15. 24 Jul, 2013 2 commits
  16. 17 Jul, 2013 1 commit
  17. 11 Jul, 2013 8 commits
  18. 30 May, 2013 1 commit
  19. 27 May, 2013 2 commits
    • antirez's avatar
      Replication: send REPLCONF ACK to master. · 146f1d7d
      antirez authored
      146f1d7d
    • antirez's avatar
      REPLCONF ACK command. · 1e77b77d
      antirez authored
      This special command is used by the slave to inform the master the
      amount of replication stream it currently consumed.
      
      it does not return anything so that we not need to consume additional
      bandwidth needed by the master to reply something.
      
      The master can do a number of things knowing the amount of stream
      processed, such as understanding the "lag" in bytes of the slave, verify
      if a given command was already processed by the slave, and so forth.
      1e77b77d
  20. 24 May, 2013 3 commits
  21. 06 Mar, 2013 1 commit
    • antirez's avatar
      API to lookup commands with their original name. · bc1b2e8f
      antirez authored
      A new server.orig_commands table was added to the server structure, this
      contains a copy of the commant table unaffected by rename-command
      statements in redis.conf.
      
      A new API lookupCommandOrOriginal() was added that checks both tables,
      new first, old later, so that rewriteClientCommandVector() and friends
      can lookup commands with their new or original name in order to fix the
      client->cmd pointer when the argument vector is renamed.
      
      This fixes the segfault of issue #986, but does not fix a wider range of
      problems resulting from renaming commands that actually operate on data
      and are registered into the AOF file or propagated to slaves... That is
      command renaming should be handled with care.
      bc1b2e8f
  22. 12 Feb, 2013 1 commit
  23. 11 Feb, 2013 1 commit
  24. 05 Feb, 2013 1 commit
  25. 28 Jan, 2013 1 commit
    • antirez's avatar
      Fix decrRefCount() prototype from void to robj pointer. · 2825f21f
      antirez authored
      decrRefCount used to get its argument as a void* pointer in order to be
      used as destructor where a 'void free_object(void*)' prototype is
      expected. However this made simpler to introduce bugs by freeing the
      wrong pointer. This commit fixes the argument type and introduces a new
      wrapper called decrRefCountVoid() that can be used when the void*
      argument is needed.
      2825f21f
  26. 19 Jan, 2013 1 commit