1. 24 Aug, 2012 1 commit
    • antirez's avatar
      Better Out of Memory handling. · 5de75120
      antirez authored
      The previous implementation of zmalloc.c was not able to handle out of
      memory in an application-specific way. It just logged an error on
      standard error, and aborted.
      
      The result was that in the case of an actual out of memory in Redis
      where malloc returned NULL (In Linux this actually happens under
      specific overcommit policy settings and/or with no or little swap
      configured) the error was not properly logged in the Redis log.
      
      This commit fixes this problem, fixing issue #509.
      Now the out of memory is properly reported in the Redis log and a stack
      trace is generated.
      
      The approach used is to provide a configurable out of memory handler
      to zmalloc (otherwise the default one logging the event on the
      standard output is used).
      5de75120
  2. 11 Jun, 2012 1 commit
    • antirez's avatar
      Dump ziplist hex value on failed assertion. · 0b8441c1
      antirez authored
      The ziplist -> hashtable conversion code is triggered every time an hash
      value must be promoted to a full hash table because the number or size of
      elements reached the threshold.
      
      If a problem in the ziplist causes the same field to be present
      multiple times, the assertion of successful addition of the element
      inside the hash table will fail, crashing server with a failed
      assertion, but providing little information about the problem.
      
      This code adds a new logging function to perform the hex dump of binary
      data, and makes sure that the ziplist -> hashtable conversion code uses
      this new logging facility to dump the content of the ziplist when the
      assertion fails.
      
      This change was originally made in order to investigate issue #547.
      0b8441c1
  3. 14 May, 2012 1 commit
    • antirez's avatar
      Impovements for: Redis timer, hashes rehashing, keys collection. · a8a981a8
      antirez authored
      A previous commit introduced REDIS_HZ define that changes the frequency
      of calls to the serverCron() Redis function. This commit improves
      different related things:
      
      1) Software watchdog: now the minimal period can be set according to
      REDIS_HZ. The minimal period is two times the timer period, that is:
      
          (1000/REDIS_HZ)*2 milliseconds
      
      2) The incremental rehashing is now performed in the expires dictionary
      as well.
      
      3) The activeExpireCycle() function was improved in different ways:
      
      - Now it checks if it already used too much time using microseconds
        instead of milliseconds for better precision.
      - The time limit is now calculated correctly, in the previous version
        the division was performed before of the multiplication resulting in
        a timelimit of 0 if HZ was big enough.
      - Databases with less than 1% of buckets fill in the hash table are
        skipped, because getting random keys is too expensive in this
        condition.
      
      4) tryResizeHashTables() is now called at every timer call, we need to
         match the number of calls we do to the expired keys colleciton cycle.
      
      5) REDIS_HZ was raised to 100.
      a8a981a8
  4. 27 Apr, 2012 1 commit
  5. 24 Apr, 2012 1 commit
    • antirez's avatar
      Fix and refactoring of code used to get registers on crash. · 38b60dea
      antirez authored
      This fixes compilation on FreeBSD (and possibly other systems) by
      not using ucontext_t at all if HAVE_BACKTRACE is not defined.
      Also the ifdefs to get the registers are modified to explicitly test for the
      operating system in the first level, and the arch in the second level
      of nesting.
      38b60dea
  6. 05 Apr, 2012 1 commit
  7. 28 Mar, 2012 4 commits
  8. 27 Mar, 2012 1 commit
  9. 18 Mar, 2012 1 commit
  10. 21 Feb, 2012 1 commit
  11. 08 Feb, 2012 1 commit
  12. 21 Jan, 2012 1 commit
  13. 20 Jan, 2012 4 commits
  14. 12 Jan, 2012 1 commit
  15. 21 Dec, 2011 2 commits
  16. 20 Dec, 2011 1 commit
  17. 24 Nov, 2011 1 commit
  18. 12 Nov, 2011 1 commit
  19. 08 Nov, 2011 1 commit
  20. 14 Oct, 2011 1 commit
  21. 04 Oct, 2011 2 commits
  22. 30 Jun, 2011 1 commit
  23. 25 Jun, 2011 1 commit
  24. 10 May, 2011 1 commit
  25. 06 Apr, 2011 1 commit
  26. 14 Mar, 2011 1 commit
  27. 09 Jan, 2011 3 commits
  28. 08 Jan, 2011 1 commit
  29. 03 Jan, 2011 1 commit
  30. 01 Jan, 2011 1 commit