1. 21 Jan, 2015 1 commit
    • antirez's avatar
      AOF rewrite: set iterator var to NULL when freed. · 23cc0a3f
      antirez authored
      The cleanup code expects that if 'di' is not NULL, it is a valid
      iterator that should be freed.
      
      The result of this bug was a crash of the AOF rewriting process if an
      error occurred after the DBs data are written and the iterator is no
      longer valid.
      23cc0a3f
  2. 06 Oct, 2014 3 commits
    • Matt Stancliff's avatar
      Clean up text throughout project · bd62c952
      Matt Stancliff authored
        - Remove trailing newlines from redis.conf
        - Fix comment misspelling
        - Clarifies zipEncodeLength usage and a C API mention (#1243, #1242)
        - Fix cluster typos (inspired by @papanikge #1507)
        - Fix rewite -> rewrite in a few places (inspired by #682)
      
      Closes #1243, #1242, #1507
      bd62c952
    • zionwu's avatar
      Fix incorrect comments · f5c20f38
      zionwu authored
      error != success; and 0 != number of bytes written
      
      Closes #1806
      f5c20f38
    • Jan-Erik Rediger's avatar
      Fix many small typos · 1a309ad8
      Jan-Erik Rediger authored
      Closes #1871
      1a309ad8
  3. 17 Sep, 2014 2 commits
    • antirez's avatar
      Seek at the end of AOF after truncate call. · c698616b
      antirez authored
      It is not clear if files open in append only mode will automatically fix
      their offset after a truncate(2) operation. This commit makes sure that
      we reposition the AOF file descriptor offset at the end of the file
      after a truncated AOF is loaded and trimmed to the last valid command.
      c698616b
    • antirez's avatar
      On AOF end of file, truncate the AOF to last valid command. · ac76d56e
      antirez authored
      Recently we introduced the ability to load truncated AOFs, but
      unfortuantely the support was broken since the server, after loading the
      truncated AOF, continues appending to the file that is corrupted at the
      end. The problem is fixed only in the next AOF rewrite.
      
      This commit fixes the issue by truncating the AOF to the last valid
      opcode, and aborting if it is not possible to truncate the file
      correctly.
      ac76d56e
  4. 08 Sep, 2014 3 commits
  5. 26 Aug, 2014 1 commit
  6. 18 Jul, 2014 14 commits
  7. 28 Apr, 2014 2 commits
    • antirez's avatar
      CLIENT LIST speedup via peerid caching + smart allocation. · a11ae385
      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.
      a11ae385
    • antirez's avatar
      Process events with processEventsWhileBlocked() when blocked. · cdd2bd56
      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).
      cdd2bd56
  8. 24 Mar, 2014 1 commit
    • Matt Stancliff's avatar
      Fix data loss when save AOF/RDB with no free space · 65e04528
      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
      65e04528
  9. 12 Feb, 2014 1 commit
    • antirez's avatar
      AOF: don't abort on write errors unless fsync is 'always'. · dd73a7bf
      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.
      dd73a7bf
  10. 14 Jan, 2014 1 commit
  11. 05 Dec, 2013 1 commit
  12. 03 Dec, 2013 1 commit
  13. 20 Aug, 2013 1 commit
  14. 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
  15. 05 Jul, 2013 1 commit
  16. 24 Jun, 2013 1 commit
  17. 02 May, 2013 1 commit
  18. 24 Apr, 2013 2 commits
  19. 27 Feb, 2013 1 commit
  20. 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