1. 04 Dec, 2014 1 commit
  2. 03 Dec, 2014 4 commits
  3. 02 Dec, 2014 2 commits
    • antirez's avatar
      6a0b1b5b
    • antirez's avatar
      Mark PFCOUNT as read-only, even if not true. · 69efb59a
      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).
      69efb59a
  4. 26 Nov, 2014 1 commit
    • antirez's avatar
      Fix DEBUG OBJECT lru field to report seconds. · 4c1b3add
      antirez authored
      Because of (not so) recent Redis changes, now the LRU internally
      reported unit is milliseconds, not seconds, but the DEBUG OBJECT output
      was still claiming seconds while providing milliseconds.
      However OBJECT IDLETIME was working as expected, which is the correct
      API to use.
      4c1b3add
  5. 25 Nov, 2014 2 commits
  6. 14 Nov, 2014 2 commits
    • antirez's avatar
      6b53b32b
    • Matt Stancliff's avatar
      Lua: Add bitop · d071e5fe
      Matt Stancliff authored
      A few people have written custom C commands because bit
      manipulation isn't exposed through Lua.  Let's give
      them Mike Pall's bitop.
      
      This adds bitop 1.0.2 (2012-05-08) from http://bitop.luajit.org/
      
      bitop is imported as "bit" into the global namespace.
      
      New Lua commands: bit.tobit, bit.tohex, bit.bnot, bit.band, bit.bor, bit.bxor,
      bit.lshift, bit.rshift, bit.arshift, bit.rol, bit.ror, bit.bswap
      
      Verification of working (the asserts would abort on error, so (nil) is correct):
      127.0.0.1:6379> eval "assert(bit.tobit(1) == 1); assert(bit.band(1) == 1); assert(bit.bxor(1,2) == 3); assert(bit.bor(1,2,4,8,16,32,64,128) == 255)" 0
      (nil)
      127.0.0.1:6379> eval 'assert(0x7fffffff == 2147483647, "broken hex literals"); assert(0xffffffff == -1 or 0xffffffff == 2^32-1, "broken hex literals"); assert(tostring(-1) == "-1", "broken tostring()"); assert(tostring(0xffffffff) == "-1" or tostring(0xffffffff) == "4294967295", "broken tostring()")' 0
      (nil)
      
      Tests also integrated into the scripting tests and can be run with:
      ./runtest --single unit/scripting
      
      Tests are excerpted from `bittest.lua` included in the bitop distribution.
      d071e5fe
  7. 12 Nov, 2014 5 commits
  8. 31 Oct, 2014 3 commits
  9. 30 Oct, 2014 1 commit
  10. 29 Oct, 2014 19 commits