1. 24 Jun, 2015 1 commit
  2. 05 May, 2015 1 commit
  3. 24 Mar, 2015 1 commit
    • antirez's avatar
      Cluster: redirection refactoring + handling of blocked clients. · 9b7f8b1c
      antirez authored
      There was a bug in Redis Cluster caused by clients blocked in a blocking
      list pop operation, for keys no longer handled by the instance, or
      in a condition where the cluster became down after the client blocked.
      
      A typical situation is:
      
      1) BLPOP <somekey> 0
      2) <somekey> hash slot is resharded to another master.
      
      The client will block forever int this case.
      
      A symmentrical non-cluster-specific bug happens when an instance is
      turned from master to slave. In that case it is more serious since this
      will desynchronize data between slaves and masters. This other bug was
      discovered as a side effect of thinking about the bug explained and
      fixed in this commit, but will be fixed in a separated commit.
      9b7f8b1c
  4. 22 Mar, 2015 1 commit
  5. 21 Mar, 2015 1 commit
  6. 20 Mar, 2015 2 commits
    • antirez's avatar
      Cluster: better cluster state transiction handling. · 25c0f5ac
      antirez authored
      Before we relied on the global cluster state to make sure all the hash
      slots are linked to some node, when getNodeByQuery() is called. So
      finding the hash slot unbound was checked with an assertion. However
      this is fragile. The cluster state is often updated in the
      clusterBeforeSleep() function, and not ASAP on state change, so it may
      happen to process clients with a cluster state that is 'ok' but yet
      certain hash slots set to NULL.
      
      With this commit the condition is also checked in getNodeByQuery() and
      reported with a identical error code of -CLUSTERDOWN but slightly
      different error message so that we have more debugging clue in the
      future.
      
      Root cause of issue #2288.
      25c0f5ac
    • antirez's avatar
      Cluster: move clusterBeforeSleep() call before unblocked clients processing. · 2ecb5edf
      antirez authored
      Related to issue #2288.
      2ecb5edf
  7. 11 Mar, 2015 2 commits
  8. 27 Feb, 2015 1 commit
    • antirez's avatar
      Hash: HSTRLEN (was HVSTRLEN) improved. · 4e54b85a
      antirez authored
      1. HVSTRLEN -> HSTRLEN. It's unlikely one needs the length of the key,
         not clear how the API would work (by value does not make sense) and
         there will be better names anyway.
      2. Default is to return 0 when field is missing.
      3. Default is to return 0 when key is missing.
      4. The implementation was slower than needed, and produced unnecessary COW.
      
      Related issue #2415.
      4e54b85a
  9. 21 Feb, 2015 1 commit
  10. 11 Feb, 2015 6 commits
  11. 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
  12. 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
  13. 09 Jan, 2015 5 commits
    • Matt Stancliff's avatar
      Add maxmemory limit to INFO MEMORY · 5a685f35
      Matt Stancliff authored
      Since we have the eviction policy, we should have the memory limit too.
      5a685f35
    • Matt Stancliff's avatar
      Improve consistency of INFO MEMORY fields · 6741bb98
      Matt Stancliff authored
      Adds used_memory_rss_human and used_memory_lua_human to match
      all the other fields reporting human-readable memory too.
      6741bb98
    • 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
  14. 02 Jan, 2015 2 commits
  15. 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
  16. 19 Dec, 2014 1 commit
  17. 17 Dec, 2014 1 commit
  18. 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
  19. 13 Dec, 2014 2 commits
  20. 11 Dec, 2014 3 commits
  21. 10 Dec, 2014 1 commit
  22. 04 Dec, 2014 1 commit
  23. 03 Dec, 2014 1 commit
    • antirez's avatar
      Network bandwidth tracking + refactoring. · 1b732c09
      antirez authored
      Track bandwidth used by clients and replication (but diskless
      replication is not tracked since the actual transfer happens in the
      child process).
      
      This includes a refactoring that makes tracking new instantaneous
      metrics simpler.
      1b732c09