1. 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
  2. 13 Dec, 2014 2 commits
  3. 11 Dec, 2014 1 commit
  4. 10 Dec, 2014 1 commit
  5. 04 Dec, 2014 1 commit
  6. 03 Dec, 2014 2 commits
  7. 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
  8. 12 Nov, 2014 1 commit
  9. 11 Nov, 2014 1 commit
  10. 27 Oct, 2014 1 commit
  11. 16 Oct, 2014 2 commits
  12. 14 Oct, 2014 1 commit
  13. 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
  14. 29 Sep, 2014 2 commits
  15. 17 Sep, 2014 1 commit
  16. 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
  17. 08 Sep, 2014 1 commit
  18. 25 Aug, 2014 2 commits
  19. 18 Aug, 2014 2 commits
  20. 13 Aug, 2014 1 commit
  21. 08 Aug, 2014 1 commit
  22. 07 Aug, 2014 3 commits
    • 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
    • antirez's avatar
      Force quit when receiving a second SIGINT. · 7bb25f8a
      antirez authored
      Also quit ASAP when we are still loading a DB, since care is not needed
      in this special condition, especially for a SIGINT.
      7bb25f8a
    • Matt Stancliff's avatar
      Add graceful exit when Ctrl-C is received · d99a7246
      Matt Stancliff authored
      d99a7246
  23. 28 Jul, 2014 1 commit
  24. 18 Jul, 2014 1 commit
  25. 16 Jul, 2014 2 commits
    • antirez's avatar
      Variadic PING with support for Pub/Sub. · 27839e5e
      antirez authored
      PING can now be called with an additional arugment, behaving exactly
      like the ECHO command. PING can now also be called in Pub/Sub mode (with
      one more more subscriptions to channels / patterns) in order to trigger
      the delivery of an asynchronous pong message with the optional payload.
      
      This fixes issue #420.
      27839e5e
    • antirez's avatar
      PubSub clients refactoring and new PUBSUB flag. · 59cf0824
      antirez authored
      The code tested many times if a client had active Pub/Sub subscriptions
      by checking the length of a list and dictionary where the patterns and
      channels are stored. This was substituted with a client flag called
      REDIS_PUBSUB that is simpler to test for. Moreover in order to manage
      this flag some code was refactored.
      
      This commit is believed to have no effects in the behavior of the
      server.
      59cf0824
  26. 11 Jul, 2014 1 commit
    • michael-grunder's avatar
      Fix OBJECT arity · ce8a68b1
      michael-grunder authored
      Previously, the command definition for the OBJECT command specified
      a minimum of two args (and that it was variadic), which meant that
      if you sent this:
      
      OBJECT foo
      
      When cluster was enabled, it would result in an assertion/SEGFAULT
      when Redis was attempting to extract keys.
      
      It appears that OBJECT is not variadic, and only ever takes 3 args.
      
      https://gist.github.com/michael-grunder/25960ce1508396d0d36a
      ce8a68b1
  27. 08 Jul, 2014 1 commit
  28. 01 Jul, 2014 4 commits