1. 13 Aug, 2014 1 commit
  2. 08 Jul, 2014 1 commit
  3. 05 Jul, 2014 2 commits
  4. 04 Jul, 2014 8 commits
  5. 02 Jul, 2014 2 commits
  6. 01 Jul, 2014 1 commit
  7. 28 Apr, 2014 1 commit
    • antirez's avatar
      CLIENT LIST speedup via peerid caching + smart allocation. · 0bcc7cb4
      antirez authored
      This commit adds peer ID caching in the client structure plus an API
      change and the use of sdsMakeRoomFor() in order to improve the
      reallocation pattern to generate the CLIENT LIST output.
      
      Both the changes account for a very significant speedup.
      0bcc7cb4
  8. 24 Apr, 2014 1 commit
    • antirez's avatar
      Process events with processEventsWhileBlocked() when blocked. · e29d3307
      antirez authored
      When we are blocked and a few events a processed from time to time, it
      is smarter to call the event handler a few times in order to handle the
      accept, read, write, close cycle of a client in a single pass, otherwise
      there is too much latency added for clients to receive a reply while the
      server is busy in some way (for example during the DB loading).
      e29d3307
  9. 24 Mar, 2014 1 commit
    • Matt Stancliff's avatar
      Fix data loss when save AOF/RDB with no free space · b47b343f
      Matt Stancliff authored
      Previously, the (!fp) would only catch lack of free space
      under OS X.  Linux waits to discover it can't write until
      it actually writes contents to disk.
      
      (fwrite() returns success even if the underlying file
      has no free space to write into.  All the errors
      only show up at flush/sync/close time.)
      
      Fixes antirez/redis#1604
      b47b343f
  10. 12 Feb, 2014 1 commit
    • antirez's avatar
      AOF: don't abort on write errors unless fsync is 'always'. · fe835254
      antirez authored
      A system similar to the RDB write error handling is used, in which when
      we can't write to the AOF file, writes are no longer accepted until we
      are able to write again.
      
      For fsync == always we still abort on errors since there is currently no
      easy way to avoid replying with success to the user otherwise, and this
      would violate the contract with the user of only acknowledging data
      already secured on disk.
      fe835254
  11. 14 Jan, 2014 1 commit
  12. 05 Dec, 2013 1 commit
  13. 03 Dec, 2013 1 commit
  14. 20 Aug, 2013 1 commit
  15. 22 Jul, 2013 1 commit
    • antirez's avatar
      Introduction of a new string encoding: EMBSTR · 894eba07
      antirez authored
      Previously two string encodings were used for string objects:
      
      1) REDIS_ENCODING_RAW: a string object with obj->ptr pointing to an sds
      stirng.
      
      2) REDIS_ENCODING_INT: a string object where the obj->ptr void pointer
      is casted to a long.
      
      This commit introduces a experimental new encoding called
      REDIS_ENCODING_EMBSTR that implements an object represented by an sds
      string that is not modifiable but allocated in the same memory chunk as
      the robj structure itself.
      
      The chunk looks like the following:
      
      +--------------+-----------+------------+--------+----+
      | robj data... | robj->ptr | sds header | string | \0 |
      +--------------+-----+-----+------------+--------+----+
                           |                       ^
                           +-----------------------+
      
      The robj->ptr points to the contiguous sds string data, so the object
      can be manipulated with the same functions used to manipulate plan
      string objects, however we need just on malloc and one free in order to
      allocate or release this kind of objects. Moreover it has better cache
      locality.
      
      This new allocation strategy should benefit both the memory usage and
      the performances. A performance gain between 60 and 70% was observed
      during micro-benchmarks, however there is more work to do to evaluate
      the performance impact and the memory usage behavior.
      894eba07
  16. 05 Jul, 2013 1 commit
  17. 24 Jun, 2013 1 commit
  18. 02 May, 2013 1 commit
  19. 24 Apr, 2013 2 commits
  20. 27 Feb, 2013 1 commit
  21. 26 Feb, 2013 1 commit
    • antirez's avatar
      Set process name in ps output to make operations safer. · 6356cf68
      antirez authored
      This commit allows Redis to set a process name that includes the binding
      address and the port number in order to make operations simpler.
      
      Redis children processes doing AOF rewrites or RDB saving change the
      name into redis-aof-rewrite and redis-rdb-bgsave respectively.
      
      This in general makes harder to kill the wrong process because of an
      error and makes simpler to identify saving children.
      
      This feature was suggested by Arnaud GRANAL in the Redis Google Group,
      Arnaud also pointed me to the setproctitle.c implementation includeed in
      this commit.
      
      This feature should work on all the Linux, OSX, and all the three major
      BSD systems.
      6356cf68
  22. 28 Jan, 2013 1 commit
    • antirez's avatar
      Fix decrRefCount() prototype from void to robj pointer. · 8766e810
      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.
      8766e810
  23. 19 Jan, 2013 2 commits
    • antirez's avatar
      Whitelist SIGUSR1 to avoid auto-triggering errors. · 79a0ef62
      antirez authored
      This commit fixes issue #875 that was caused by the following events:
      
      1) There is an active child doing BGSAVE.
      2) flushall is called (or any other condition that makes Redis killing
      the saving child process).
      3) An error is sensed by Redis as the child exited with an error (killed
      by a singal), that stops accepting write commands until a BGSAVE happens
      to be executed with success.
      
      Whitelisting SIGUSR1 and making sure Redis always uses this signal in
      order to kill its own children fixes the issue.
      79a0ef62
    • guiquanz's avatar
      Fixed many typos. · 9d09ce39
      guiquanz authored
      9d09ce39
  24. 15 Jan, 2013 1 commit
    • antirez's avatar
      CLIENT GETNAME and CLIENT SETNAME introduced. · 1971740f
      antirez authored
      Sometimes it is much simpler to debug complex Redis installations if it
      is possible to assign clients a name that is displayed in the CLIENT
      LIST output.
      
      This is the case, for example, for "leaked" connections. The ability to
      provide a name to the client makes it quite trivial to understand what
      is the part of the code implementing the client not releasing the
      resources appropriately.
      
      Behavior:
      
          CLIENT SETNAME: set a name for the client, or remove the current
                          name if an empty name is set.
          CLIENT GETNAME: get the current name, or a nil.
          CLIENT LIST: now displays the client name if any.
      
      Thanks to Mark Gravell for pushing this idea forward.
      1971740f
  25. 19 Nov, 2012 1 commit
    • antirez's avatar
      Children creating AOF or RDB files now report memory used by COW. · 49b64523
      antirez authored
      Finally Redis is able to report the amount of memory used by
      copy-on-write while saving an RDB or writing an AOF file in background.
      
      Note that this information is currently only logged (at NOTICE level)
      and not shown in INFO because this is less trivial (but surely doable
      with some minor form of interprocess communication).
      
      The reason we can't capture this information on the parent before we
      call wait3() is that the Linux kernel will release the child memory
      ASAP, and only retain the minimal state for the process that is useful
      to report the child termination to the parent.
      
      The COW size is obtained by summing all the Private_Dirty fields found
      in the "smap" file inside the proc filesystem for the process.
      
      All this is Linux specific and is not available on other systems.
      49b64523
  26. 08 Nov, 2012 1 commit
  27. 18 Jul, 2012 1 commit
    • Saj Goonatilleke's avatar
      Truncate short write from the AOF · 55302e9e
      Saj Goonatilleke authored
      If Redis only manages to write out a partial buffer, the AOF file won't
      load back into Redis the next time it starts up.  It is better to
      discard the short write than waste time running redis-check-aof.
      55302e9e
  28. 17 Jul, 2012 1 commit
    • Saj Goonatilleke's avatar
      New in INFO: aof_last_bgrewrite_status · 48553a29
      Saj Goonatilleke authored
      Behaves like rdb_last_bgsave_status -- even down to reporting 'ok' when
      no rewrite has been done yet.  (You might want to check that
      aof_last_rewrite_time_sec is not -1.)
      48553a29
  29. 25 May, 2012 1 commit
    • antirez's avatar
      Four new persistence fields in INFO. A few renamed. · 33e1db36
      antirez authored
      The 'persistence' section of INFO output now contains additional four
      fields related to RDB and AOF persistence:
      
       rdb_last_bgsave_time_sec       Duration of latest BGSAVE in sec.
       rdb_current_bgsave_time_sec    Duration of current BGSAVE in sec.
       aof_last_rewrite_time_sec      Duration of latest AOF rewrite in sec.
       aof_current_rewrite_time_sec   Duration of current AOF rewrite in sec.
      
      The 'current' fields are set to -1 if a BGSAVE / AOF rewrite is not in
      progress. The 'last' fileds are set to -1 if no previous BGSAVE / AOF
      rewrites were performed.
      
      Additionally a few fields in the persistence section were renamed for
      consistency:
      
       changes_since_last_save -> rdb_changes_since_last_save
       bgsave_in_progress -> rdb_bgsave_in_progress
       last_save_time -> rdb_last_save_time
       last_bgsave_status -> rdb_last_bgsave_status
       bgrewriteaof_in_progress -> aof_rewrite_in_progress
       bgrewriteaof_scheduled -> aof_rewrite_scheduled
      
      After the renaming, fields in the persistence section start with rdb_ or
      aof_ prefix depending on the persistence method they describe.
      The field 'loading' and related fields are not prefixed because they are
      unique for both the persistence methods.
      33e1db36