1. 21 Sep, 2012 1 commit
    • antirez's avatar
      Added the SRANDMEMBER key <count> variant. · dd947715
      antirez authored
      SRANDMEMBER called with just the key argument can just return a single
      random element from a Redis Set. However many users need to return
      multiple unique elements from a Set, this is not a trivial problem to
      handle in the client side, and for truly good performance a C
      implementation was required.
      
      After many requests for this feature it was finally implemented.
      
      The problem implementing this command is the strategy to follow when
      the number of elements the user asks for is near to the number of
      elements that are already inside the set. In this case asking random
      elements to the dictionary API, and trying to add it to a temporary set,
      may result into an extremely poor performance, as most add operations
      will be wasted on duplicated elements.
      
      For this reason this implementation uses a different strategy in this
      case: the Set is copied, and random elements are returned to reach the
      specified count.
      
      The code actually uses 4 different algorithms optimized for the
      different cases.
      
      If the count is negative, the command changes behavior and allows for
      duplicated elements in the returned subset.
      dd947715
  2. 08 Nov, 2011 1 commit
  3. 04 Oct, 2011 1 commit
  4. 20 Jun, 2011 1 commit
  5. 31 May, 2011 1 commit
  6. 15 May, 2011 1 commit
  7. 19 Apr, 2011 1 commit
  8. 15 Apr, 2011 1 commit
  9. 16 Feb, 2011 1 commit
  10. 29 Dec, 2010 1 commit
  11. 09 Dec, 2010 2 commits
  12. 17 Oct, 2010 1 commit
  13. 02 Sep, 2010 2 commits
  14. 30 Aug, 2010 1 commit
  15. 26 Aug, 2010 3 commits
  16. 21 Aug, 2010 1 commit
  17. 12 Jul, 2010 1 commit
  18. 01 Jul, 2010 1 commit
    • antirez's avatar
      redis.c split into many different C files. · e2641e09
      antirez authored
      networking related stuff moved into networking.c
      
      moved more code
      
      more work on layout of source code
      
      SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)
      
      cleanly compiling again after the first split, now splitting it in more C files
      
      moving more things around... work in progress
      
      split replication code
      
      splitting more
      
      Sets split
      
      Hash split
      
      replication split
      
      even more splitting
      
      more splitting
      
      minor change
      e2641e09