1. 30 Jan, 2017 1 commit
  2. 13 Jan, 2017 1 commit
  3. 19 Dec, 2016 1 commit
  4. 16 Dec, 2016 2 commits
  5. 02 Jan, 2015 2 commits
    • Matt Stancliff's avatar
      Free ziplist test lists during tests · 0f15eb18
      Matt Stancliff authored
      Freeing our test lists helps keep valgrind output clean
      0f15eb18
    • Matt Stancliff's avatar
      Add ziplistMerge() · 9d2dc024
      Matt Stancliff authored
      This started out as #2158 by sunheehnus, but I kept rewriting it
      until I could understand things more easily and get a few more
      correctness guarantees out of the readability flow.
      
      The original commit created and returned a new ziplist with the contents of
      both input ziplists, but I prefer to grow one of the input ziplists
      and destroy the other one.
      
      So, instead of malloc+copy as in #2158, the merge now reallocs one of
      the existing ziplists and copies the other ziplist into the new space.
      
      Also added merge test cases to ziplistTest()
      9d2dc024
  6. 23 Dec, 2014 6 commits
    • Matt Stancliff's avatar
      Cleanup ziplist valgrind warnings · 9b786b12
      Matt Stancliff authored
      Valgrind can't detect 'memset' initializes things, so let's
      statically initialize them to remove some unnecessary warnings.
      9b786b12
    • Matt Stancliff's avatar
      Fix ziplist test for pop() · 1dfcd75a
      Matt Stancliff authored
      The previous test wasn't returning the new ziplist, so the test
      was invalid.  Now the test works properly.
      
      These problems were simultaenously discovered in #2154 and that
      PR also had an additional fix we included here.
      1dfcd75a
    • Matt Stancliff's avatar
      Fix ziplistDeleteRange index parameter · 53b1ee34
      Matt Stancliff authored
      It's valid to delete from negative offsets, so we *don't*
      want unsigned arguments here.
      53b1ee34
    • Matt Stancliff's avatar
      Fix how zipEntry returns values · fae53dea
      Matt Stancliff authored
      zipEntry was returning a struct, but that caused some
      problems with tests under 32 bit builds.
      
      The tests run better if we operate on structs allocated in the
      caller without worrying about copying on return.
      fae53dea
    • 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
      Remove ziplist compiler warnings · 8380655e
      Matt Stancliff authored
      Only happen when compiled with the test define.
      8380655e
  7. 29 Sep, 2014 2 commits
  8. 08 Aug, 2014 1 commit
  9. 19 Aug, 2013 1 commit
  10. 28 Jan, 2013 1 commit
  11. 19 Nov, 2012 1 commit
  12. 08 Nov, 2012 1 commit
  13. 13 Aug, 2012 2 commits
  14. 18 Jul, 2012 1 commit
    • antirez's avatar
      Don't assume that "char" is signed. · b62bdf1c
      antirez authored
      For the C standard char can be either signed or unsigned, it's up to the
      compiler, but Redis assumed that it was signed in a few places.
      
      The practical effect of this patch is that now Redis 2.6 will run
      correctly in every system where char is unsigned, notably the RaspBerry
      PI and other ARM systems with GCC.
      
      Thanks to Georgi Marinov (@eesn on twitter) that reported the problem
      and allowed me to use his RaspBerry via SSH to trace and fix the issue!
      b62bdf1c
  15. 14 Jun, 2012 1 commit
    • antirez's avatar
      ziplistFind(): don't assume that entries are comparable by encoding. · ba779119
      antirez authored
      Because Redis 2.6 introduced new integer encodings it is no longer true
      that if two entries have a different encoding they are not equal.
      
      An old ziplist can be loaded from an RDB file generated with Redis 2.4,
      in this case for instance a small unsigned integers is encoded with a
      16 bit encoding, while in Redis 2.6 a more specific 8 bit encoding
      format is used.
      
      Because of this bug hashes ended with duplicated values or fields lookup
      failed, causing many bad behaviors.
      This in turn caused a crash while converting the ziplist encoded hash into
      a real hash table because an assertion was raised on duplicated elements.
      
      This commit fixes issue #547.
      
      Many thanks to Pinterest's Marty Weiner and colleagues for discovering
      the problem and helping us in the debugging process.
      ba779119
  16. 06 May, 2012 1 commit
    • Pieter Noordhuis's avatar
      Compare integers in ziplist regardless of encoding · bf219416
      Pieter Noordhuis authored
      Because of the introduction of new integer encoding types for ziplists
      in the 2.6 tree, the same integer value may have a different encoding in
      different versions of the ziplist implementation. This means that the
      encoding can NOT be used as a fast path in comparing integers.
      bf219416
  17. 24 Apr, 2012 4 commits
  18. 23 Mar, 2012 1 commit
  19. 14 Feb, 2012 1 commit
  20. 09 Feb, 2012 3 commits
  21. 08 Feb, 2012 2 commits
  22. 04 Jan, 2012 1 commit
    • Pieter Noordhuis's avatar
      Implements ziplistFind · fe458402
      Pieter Noordhuis authored
      To improve the performance of the ziplist implementation, some
      functions have been converted to macros to avoid unnecessary stack
      movement and duplicate variable assignments.
      fe458402
  23. 23 Oct, 2011 1 commit
  24. 05 May, 2011 2 commits