1. 22 Oct, 2024 1 commit
  2. 08 Feb, 2024 1 commit
    • Binbin's avatar
      Fix SORT STORE quicklist with the right options (#13042) · 813327b2
      Binbin authored
      We forgot to call quicklistSetOptions after createQuicklistObject,
      in the sort store scenario, we will create a quicklist with default
      fill or compress options.
      
      This PR adds fill and depth parameters to createQuicklistObject to
      specify that options need to be set after creating a quicklist.
      
      This closes #12871.
      
      release notes:
      > Fix lists created by SORT STORE to respect list compression and
      packing configs.
      813327b2
  3. 13 Dec, 2023 1 commit
  4. 31 Aug, 2023 1 commit
  5. 30 Aug, 2023 1 commit
  6. 16 Jan, 2023 1 commit
  7. 16 Nov, 2022 1 commit
    • sundb's avatar
      Add listpack encoding for list (#11303) · 2168ccc6
      sundb authored
      Improve memory efficiency of list keys
      
      ## Description of the feature
      The new listpack encoding uses the old `list-max-listpack-size` config
      to perform the conversion, which we can think it of as a node inside a
      quicklist, but without 80 bytes overhead (internal fragmentation included)
      of quicklist and quicklistNode structs.
      For example, a list key with 5 items of 10 chars each, now takes 128 bytes
      instead of 208 it used to take.
      
      ## Conversion rules
      * Convert listpack to quicklist
        When the listpack length or size reaches the `list-max-listpack-size` limit,
        it will be converted to a quicklist.
      * Convert quicklist to listpack
        When a quicklist has only one node, and its length or size is reduced to half
        of the `list-max-listpack-size` limit, it will be converted to a listpack.
        This is done to avoid frequent conversions when we add or remove at the bounding size or length.
          
      ## Interface changes
      1. add list entry param to listTypeSetIteratorDirection
          When list encoding is listpack, `listTypeIterator->lpi` points to the next entry of current entry,
          so when changing the direction, we need to use the current node (listTypeEntry->p) to 
          update `listTypeIterator->lpi` to the next node in the reverse direction.
      
      ## Benchmark
      ### Listpack VS Quicklist with one node
      * LPUSH - roughly 0.3% improvement
      * LRANGE - roughly 13% improvement
      
      ### Both are quicklist
      * LRANGE - roughly 3% improvement
      * LRANGE without pipeline - roughly 3% improvement
      
      From the benchmark, as we can see from the results
      1. When list is quicklist encoding, LRANGE improves performance by <5%.
      2. When list is listpack encoding, LRANGE improves performance by ~13%,
         the main enhancement is brought by `addListListpackRangeReply()`.
      
      ## Memory usage
      1M lists(key:0~key:1000000) with 5 items of 10 chars ("hellohello") each.
      shows memory usage down by 35.49%, from 214MB to 138MB.
      
      ## Note
      1. Add conversion callback to support doing some work before conversion
          Since the quicklist iterator decompresses the current node when it is released, we can 
          no longer decompress the quicklist after we convert the list.
      2168ccc6
  8. 09 Aug, 2021 1 commit
  9. 09 Jun, 2021 1 commit
    • Yossi Gottlieb's avatar
      Improve test suite to handle external servers better. (#9033) · 8a86bca5
      Yossi Gottlieb authored
      This commit revives the improves the ability to run the test suite against
      external servers, instead of launching and managing `redis-server` processes as
      part of the test fixture.
      
      This capability existed in the past, using the `--host` and `--port` options.
      However, it was quite limited and mostly useful when running a specific tests.
      Attempting to run larger chunks of the test suite experienced many issues:
      
      * Many tests depend on being able to start and control `redis-server` themselves,
      and there's no clear distinction between external server compatible and other
      tests.
      * Cluster mode is not supported (resulting with `CROSSSLOT` errors).
      
      This PR cleans up many things and makes it possible to run the entire test suite
      against an external server. It also provides more fine grained controls to
      handle cases where the external server supports a subset of the Redis commands,
      limited number of databases, cluster mode, etc.
      
      The tests directory now contains a `README.md` file that describes how this
      works.
      
      This commit also includes additional cleanups and fixes:
      
      * Tests can now be tagged.
      * Tag-based selection is now unified across `start_server`, `tags` and `test`.
      * More information is provided about skipped or ignored tests.
      * Repeated patterns in tests have been extracted to common procedures, both at a
        global level and on a per-test file basis.
      * Cleaned up some cases where test setup was based on a previous test executing
        (a major anti-pattern that repeats itself in many places).
      * Cleaned up some cases where test teardown was not part of a test (in the
        future we should have dedicated teardown code that executes even when tests
        fail).
      * Fixed some tests that were flaky running on external servers.
      8a86bca5
  10. 02 Jan, 2015 2 commits
  11. 29 Oct, 2014 1 commit
    • Matt Stancliff's avatar
      Fix zero-ordering SORT when called against lists · 6c0abc4a
      Matt Stancliff authored
      People mostly use SORT against lists, but our prior
      behavior was pretending lists were an unordered bag
      requiring a forced-sort when no sort was requested.
      
      We can just use the native list ordering to ensure
      consistency across replicaion and scripting calls.
      
      Closes #2079
      Closes #545 (again)
      6c0abc4a
  12. 29 Sep, 2014 1 commit
  13. 07 Aug, 2014 1 commit
    • Matt Stancliff's avatar
      Fix key extraction for SORT · 87815ab5
      Matt Stancliff authored
      We only want to use the last STORE key, but we have to record
      we actually found a STORE key so we can increment the final return
      key count.
      
      Test added to prevent further regression.
      
      Closes #1883, #1645, #1647
      87815ab5
  14. 06 Apr, 2014 1 commit
  15. 03 Oct, 2012 1 commit
    • antirez's avatar
      "SORT by nosort" (skip sorting) respect sorted set ordering. · 9a914a63
      antirez authored
      When SORT is called with the option BY set to a string constant not
      inclduing the wildcard character "*", there is no way to sort the output
      so any ordering is valid. This allows the SORT internals to optimize its
      work and don't really sort the output at all.
      
      However it was odd that this option was not able to retain the natural
      order of a sorted set. This feature was requested by users multiple
      times as sometimes to call SORT with GET against sorted sets as a way to
      mass-fetch objects can be handy.
      
      This commit introduces two things:
      
      1) The ability of SORT to return sorted sets elements in their natural
      ordering when `BY nosort` is specified, accordingly to `DESC / ASC` options.
      2) The ability of SORT to optimize this case further if LIMIT is passed
      as well, avoiding to really fetch the whole sorted set, but directly
      obtaining the specified range.
      
      Because in this case the sorting is always deterministic, no
      post-sorting activity is performed when SORT is called from a Lua
      script.
      
      This commit fixes issue #98.
      9a914a63
  16. 17 Apr, 2012 1 commit
  17. 01 Feb, 2012 4 commits
  18. 30 Jan, 2012 1 commit
  19. 19 Dec, 2011 1 commit
  20. 01 Dec, 2011 1 commit
  21. 10 Dec, 2010 1 commit
  22. 15 Oct, 2010 1 commit
  23. 26 Aug, 2010 1 commit
  24. 21 Aug, 2010 4 commits
  25. 02 Jun, 2010 3 commits
  26. 14 May, 2010 2 commits