1. 20 Jun, 2016 1 commit
  2. 04 May, 2016 1 commit
  3. 25 Apr, 2016 1 commit
  4. 16 Dec, 2015 3 commits
    • antirez's avatar
      Hopefully better memory test on crash. · a1c9c05e
      antirez authored
      The old test, designed to do a transformation on the bits that was
      invertible, in order to avoid touching the original memory content, was
      not effective as it was redis-server --test-memory. The former often
      reported OK while the latter was able to spot the error.
      
      So the test was substituted with one that may perform better, however
      the new one must backup the memory tested, so it tests memory in small
      pieces. This limits the effectiveness because of the CPU caches. However
      some attempt is made in order to trash the CPU cache between the fill
      and the check stages, but not for the addressing test unfortunately.
      
      We'll see if this test will be able to find errors where the old failed.
      a1c9c05e
    • antirez's avatar
      Suppress harmless warnings. · b9aeb981
      antirez authored
      b9aeb981
    • antirez's avatar
      Crash report format improvements. · 30f057d8
      antirez authored
      30f057d8
  5. 15 Dec, 2015 1 commit
  6. 28 Nov, 2015 1 commit
    • antirez's avatar
      fix sprintf and snprintf format string · 96628cc4
      antirez authored
      There are some cases of printing unsigned integer with %d conversion
      specificator and vice versa (signed integer with %u specificator).
      
      Patch by Sergey Polovko. Backported to Redis from Disque.
      96628cc4
  7. 30 Oct, 2015 2 commits
  8. 13 Oct, 2015 1 commit
  9. 01 Oct, 2015 5 commits
  10. 27 Jul, 2015 1 commit
  11. 26 Jul, 2015 6 commits
  12. 16 Jul, 2015 1 commit
  13. 14 Jul, 2015 3 commits
  14. 23 Jan, 2015 1 commit
    • antirez's avatar
      DEBUG structsize · 7885e126
      antirez authored
      Show sizes of a few important data structures in Redis. More missing.
      7885e126
  15. 19 Jan, 2015 1 commit
    • Matt Stancliff's avatar
      Improve RDB type correctness · f7043604
      Matt Stancliff authored
      It's possible large objects could be larger than 'int', so let's
      upgrade all size counters to ssize_t.
      
      This also fixes rdbSaveObject serialized bytes calculation.
      Since entire serializations of data structures can be large,
      so we don't want to limit their calculated size to a 32 bit signed max.
      
      This commit increases object size calculation and
      cascades the change back up to serializedlength printing.
      
      Before:
      127.0.0.1:6379> debug object hihihi
      ... encoding:quicklist serializedlength:-2147483559 ...
      
      After:
      127.0.0.1:6379> debug object hihihi
      ... encoding:quicklist serializedlength:2147483737 ...
      f7043604
  16. 12 Jan, 2015 2 commits
  17. 02 Jan, 2015 3 commits
    • Matt Stancliff's avatar
      Add more quicklist info to DEBUG OBJECT · 9e11d079
      Matt Stancliff authored
      Adds: ql_compressed (boolean, 1 if compression enabled for list, 0
      otherwise)
      Adds: ql_uncompressed_size (actual uncompressed size of all quicklistNodes)
      Adds: ql_ziplist_max (quicklist max ziplist fill factor)
      
      Compression ratio of the list is then ql_uncompressed_size / serializedlength
      
      We report ql_uncompressed_size for all quicklists because serializedlength
      is a _compressed_ representation anyway.
      
      Sample output from a large list:
      127.0.0.1:6379> llen abc
      (integer) 38370061
      127.0.0.1:6379> debug object abc
      Value at:0x7ff97b51d140 refcount:1 encoding:quicklist serializedlength:19878335 lru:9718164 lru_seconds_idle:5 ql_nodes:21945 ql_avg_node:1748.46 ql_ziplist_max:-2 ql_compressed:0 ql_uncompressed_size:1643187761
      (1.36s)
      
      The 1.36s result time is because rdbSavedObjectLen() is serializing the
      object, not because of any new stats reporting.
      
      If we run DEBUG OBJECT on a compressed list, DEBUG OBJECT takes almost *zero*
      time because rdbSavedObjectLen() reuses already-compressed ziplists:
      127.0.0.1:6379> debug object abc
      Value at:0x7fe5c5800040 refcount:1 encoding:quicklist serializedlength:19878335 lru:9718109 lru_seconds_idle:5 ql_nodes:21945 ql_avg_node:1748.46 ql_ziplist_max:-2 ql_compressed:1 ql_uncompressed_size:1643187761
      9e11d079
    • Matt Stancliff's avatar
      Allow compression of interior quicklist nodes · abdd1414
      Matt Stancliff authored
      Let user set how many nodes to *not* compress.
      
      We can specify a compression "depth" of how many nodes
      to leave uncompressed on each end of the quicklist.
      
      Depth 0 = disable compression.
      Depth 1 = only leave head/tail uncompressed.
        - (read as: "skip 1 node on each end of the list before compressing")
      Depth 2 = leave head, head->next, tail->prev, tail uncompressed.
        - ("skip 2 nodes on each end of the list before compressing")
      Depth 3 = Depth 2 + head->next->next + tail->prev->prev
        - ("skip 3 nodes...")
      etc.
      
      This also:
        - updates RDB storage to use native quicklist compression (if node is
          already compressed) instead of uncompressing, generating the RDB string,
          then re-compressing the quicklist node.
        - internalizes the "fill" parameter for the quicklist so we don't
          need to pass it to _every_ function.  Now it's just a property of
          the list.
        - allows a runtime-configurable compression option, so we can
          expose a compresion parameter in the configuration file if people
          want to trade slight request-per-second performance for up to 90%+
          memory savings in some situations.
        - updates the quicklist tests to do multiple passes: 200k+ tests now.
      abdd1414
    • Matt Stancliff's avatar
      Add quicklist info to DEBUG OBJECT · 5127e399
      Matt Stancliff authored
      Added field 'ql_nodes' and 'ql_avg_per_node'.
      
      ql_nodes is the number of quicklist nodes in the quicklist.
      ql_avg_node is the average fill level in each quicklist node. (LLEN / QL_NODES)
      
      Sample output:
      127.0.0.1:6379> DEBUG object b
      Value at:0x7fa42bf2fed0 refcount:1 encoding:quicklist serializedlength:18489 lru:8983768 lru_seconds_idle:3 ql_nodes:430 ql_avg_per_node:511.73
      127.0.0.1:6379> llen b
      (integer) 220044
      5127e399
  18. 23 Dec, 2014 1 commit
    • Matt Stancliff's avatar
      Add DEBUG JEMALLOC INFO · 27937c28
      Matt Stancliff authored
      Uses jemalloc function malloc_stats_print() to return
      stats about what jemalloc has allocated internally.
      27937c28
  19. 10 Dec, 2014 1 commit
    • antirez's avatar
      Better read-only behavior for expired keys in slaves. · 06e76bc3
      antirez authored
      Slaves key expire is orchestrated by the master. Sometimes the master
      will send the synthesized DEL to expire keys on the slave with a non
      trivial delay (when the key is not accessed, only the incremental expiry
      algorithm will expire it in background).
      
      During that time, a key is logically expired, but slaves still return
      the key if you GET (or whatever) it. This is a bad behavior.
      
      However we can't simply trust the slave view of the key, since we need
      the master to be able to send write commands to update the slave data
      set, and DELs should only happen when the key is expired in the master
      in order to ensure consistency.
      
      However 99.99% of the issues with this behavior is when a client which
      is not a master sends a read only command. In this case we are safe and
      can consider the key as non existing.
      
      This commit does a few changes in order to make this sane:
      
      1. lookupKeyRead() is modified in order to return NULL if the above
      conditions are met.
      2. Calls to lookupKeyRead() in commands actually writing to the data set
      are repliaced with calls to lookupKeyWrite().
      
      There are redundand checks, so for example, if in "2" something was
      overlooked, we should be still safe, since anyway, when the master
      writes the behavior is to don't care about what expireIfneeded()
      returns.
      
      This commit is related to  #1768, #1770, #2131.
      06e76bc3
  20. 26 Nov, 2014 1 commit
    • antirez's avatar
      Fix DEBUG OBJECT lru field to report seconds. · acf73a05
      antirez authored
      Because of (not so) recent Redis changes, now the LRU internally
      reported unit is milliseconds, not seconds, but the DEBUG OBJECT output
      was still claiming seconds while providing milliseconds.
      However OBJECT IDLETIME was working as expected, which is the correct
      API to use.
      acf73a05
  21. 11 Nov, 2014 1 commit
  22. 09 Oct, 2014 1 commit
  23. 29 Sep, 2014 1 commit