1. 11 Feb, 2015 4 commits
  2. 03 Feb, 2015 1 commit
    • antirez's avatar
      Handle redis-check-rdb as a standalone program. · 7d1e1580
      antirez authored
      This also makes it backward compatible in the usage, but for the command
      name. However the old command name was less obvious so it is worth to
      break it probably.
      
      With the new setup the program main can perform argument parsing and
      everything else useful for an RDB check regardless of the Redis server
      itself.
      7d1e1580
  3. 28 Jan, 2015 1 commit
    • Matt Stancliff's avatar
      Convert check-dump to Redis check-rdb mode · 145473ac
      Matt Stancliff authored
      redis-check-dump is now named redis-check-rdb and it runs
      as a mode of redis-server instead of an independent binary.
      
      You can now use 'redis-server redis.conf --check-rdb' to check
      the RDB defined in redis.conf.  Using argument --check-rdb
      checks the RDB and exits.  We could potentially also allow
      the server to continue starting if the RDB check succeeds.
      
      This change also enables us to use RDB checking programatically
      from inside Redis for certain failure conditions.
      145473ac
  4. 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
  5. 02 Jan, 2015 2 commits
  6. 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
  7. 19 Dec, 2014 1 commit
  8. 17 Dec, 2014 1 commit
  9. 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
  10. 13 Dec, 2014 2 commits
  11. 11 Dec, 2014 3 commits
  12. 10 Dec, 2014 1 commit
  13. 04 Dec, 2014 1 commit
  14. 03 Dec, 2014 2 commits
  15. 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
  16. 12 Nov, 2014 1 commit
  17. 11 Nov, 2014 1 commit
  18. 27 Oct, 2014 1 commit
  19. 16 Oct, 2014 2 commits
  20. 14 Oct, 2014 1 commit
  21. 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
  22. 29 Sep, 2014 2 commits
  23. 17 Sep, 2014 1 commit
  24. 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
  25. 08 Sep, 2014 1 commit
  26. 25 Aug, 2014 1 commit