1. 09 Jan, 2015 3 commits
    • Matt Stancliff's avatar
      Supervise redis processes only if configured · 36a3b753
      Matt Stancliff authored
      Adds configuration option 'supervised [no | upstart | systemd | auto]'
      
      Also removed 'bzero' from the previous implementation because it's 2015.
      (We could actually statically initialize those structs, but clang
      throws an invalid warning when we try, so it looks bad even though it
      isn't bad.)
      
      Fixes #2264
      36a3b753
    • Matt Stancliff's avatar
      Define default pidfile when creating pid · 5e8b7e4f
      Matt Stancliff authored
      We want pidfile to be NULL on startup so we can detect if the user
      set an explicit value versus only using the default value.
      
      Closes #1967
      Fixes #2076
      5e8b7e4f
    • rebx's avatar
      Create PID file even if in foreground · e6d499a4
      rebx authored
      Previously, Redis only wrote the pid file if
      it was daemonizing, but many times it's useful to have
      the pid written out even if you're in the foreground.
      
      Some background for this is:
      I usually run redis via daemontools. That entails running
      redis-server on the foreground. Given that, I'd also want
      redis-server to create a pidfile so other processes (e.g. nagios)
      can run checks for that.
      
      Closes #463
      e6d499a4
  2. 02 Jan, 2015 2 commits
  3. 23 Dec, 2014 3 commits
    • Matt Stancliff's avatar
      Allow all code tests to run using Redis args · 8febcffd
      Matt Stancliff authored
      Previously, many files had individual main() functions for testing,
      but each required being compiled with their own testing flags.
      That gets difficult when you have 8 different flags you need
      to set just to run all tests (plus, some test files required
      other files to be compiled aaginst them, and it seems some didn't
      build at all without including the rest of Redis).
      
      Now all individual test main() funcions are renamed to a test
      function for the file itself and one global REDIS_TEST define enables
      testing across the entire codebase.
      
      Tests can now be run with:
        - `./redis-server test <test>`
      
        e.g. ./redis-server test ziplist
      
      If REDIS_TEST is not defined, then no tests get included and no
      tests are included in the final redis-server binary.
      8febcffd
    • Matt Stancliff's avatar
      Add addReplyBulkSds() function · ad41a7c4
      Matt Stancliff authored
      Refactor a common pattern into one function so we don't
      end up with copy/paste programming.
      ad41a7c4
    • antirez's avatar
      INFO loading stats: three fixes. · 840435ad
      antirez authored
      1. Server unxtime may remain not updated while loading AOF, so ETA is
      not updated correctly.
      
      2. Number of processed byte was not initialized.
      
      3. Possible division by zero condition (likely cause of issue #1932).
      840435ad
  4. 19 Dec, 2014 1 commit
  5. 17 Dec, 2014 1 commit
  6. 14 Dec, 2014 1 commit
    • Alon Diamant's avatar
      Added <count> parameter to SPOP: · 28802887
      Alon Diamant authored
      spopCommand() now runs spopWithCountCommand() in case the <count> param is found.
      Added intsetRandomMembers() to Intset: Copies N random members from the set into inputted 'values' array. Uses either the Knuth or Floyd sample algos depending on ratio count/size.
      Added setTypeRandomElements() to SET type: Returns a number of random elements from a non empty set. This is a version of setTypeRandomElement() that is modified in order to return multiple entries, using dictGetRandomKeys() and intsetRandomMembers().
      Added tests for SPOP with <count>: unit/type/set, unit/scripting, integration/aof
      --
      Cleaned up code a bit to match with required Redis coding style
      28802887
  7. 13 Dec, 2014 2 commits
  8. 11 Dec, 2014 3 commits
  9. 10 Dec, 2014 1 commit
  10. 04 Dec, 2014 1 commit
  11. 03 Dec, 2014 2 commits
  12. 02 Dec, 2014 1 commit
    • antirez's avatar
      Mark PFCOUNT as read-only, even if not true. · 8a7ccc58
      antirez authored
      PFCOUNT is technically speaking a write command, since the cached value
      of the HLL is exposed in the data structure (design error, mea culpa), and
      can be modified by PFCOUNT.
      
      However if we flag PFCOUNT as "w", read only slaves can't execute the
      command, which is a problem since there are environments where slaves
      are used to scale PFCOUNT reads.
      
      Nor it is possible to just prevent PFCOUNT to modify the data structure
      in slaves, since without the cache we lose too much efficiency.
      
      So while this commit allows slaves to create a temporary inconsistency
      (the strings representing the HLLs in the master and slave can be
      different in certain moments) it is actually harmless.
      
      In the long run this should be probably fixed by turning the HLL into a
      more opaque representation, for example by storing the cached value in
      the part of the string which is not exposed (this should be possible
      with SDS strings).
      8a7ccc58
  13. 12 Nov, 2014 1 commit
  14. 11 Nov, 2014 1 commit
  15. 27 Oct, 2014 1 commit
  16. 16 Oct, 2014 2 commits
  17. 14 Oct, 2014 1 commit
  18. 08 Oct, 2014 1 commit
    • antirez's avatar
      Define different types of RDB childs. · 2df8341c
      antirez authored
      We need to remember what is the saving strategy of the current RDB child
      process, since the configuration may be modified at runtime via CONFIG
      SET and still we'll need to understand, when the child exists, what to
      do and for what goal the process was initiated: to create an RDB file
      on disk or to write stuff directly to slave's sockets.
      2df8341c
  19. 29 Sep, 2014 2 commits
  20. 17 Sep, 2014 1 commit
  21. 16 Sep, 2014 1 commit
    • antirez's avatar
      Don't propagate SAVE. · 046a00a0
      antirez authored
      This is a general fix (check that dirty delta is positive) but actually
      should have as the only effect fixing the SAVE propagation to
      AOF and slaves.
      046a00a0
  22. 08 Sep, 2014 1 commit
  23. 25 Aug, 2014 2 commits
  24. 18 Aug, 2014 2 commits
  25. 13 Aug, 2014 1 commit
  26. 08 Aug, 2014 1 commit
  27. 07 Aug, 2014 1 commit
    • Kashif Rasul's avatar
      Fix issues raised by clang analyzer · c49378fe
      Kashif Rasul authored
      Modified by @antirez since the original fix to genInfoString() looked
      weak. Probably the clang analyzer complained about `section` being
      possibly NULL, and strcasecmp() called with a NULL pointer. In the
      practice this can never happen, still for the sake of correctness
      the right fix is not to modify only the first call, but to set `section`
      to the value of "default" if it happens to be NULL.
      
      Closes #1660
      c49378fe