1. 10 Mar, 2014 4 commits
  2. 07 Mar, 2014 1 commit
    • Matt Stancliff's avatar
      Fix key extraction for z{union,inter}store · f0782a6e
      Matt Stancliff authored
      The previous implementation wasn't taking into account
      the storage key in position 1 being a requirement (it
      was only counting the source keys in positions 3 to N).
      
      Fixes antirez/redis#1581
      f0782a6e
  3. 07 Feb, 2014 1 commit
  4. 03 Feb, 2014 1 commit
    • antirez's avatar
      Scripting: expire keys in scripts only at first access. · b089ba98
      antirez authored
      Keys expiring in the middle of the execution of Lua scripts are to
      create inconsistencies in masters and / or AOF files. See the following
      example:
      
          if redis.call("exists",KEYS[1]) == 1
          then
              redis.call("incr","mycounter")
          end
      
          if redis.call("exists",KEYS[1]) == 1
          then
              return redis.call("incr","mycounter")
          end
      
      The script executes two times the same *if key exists then incrementcounter*
      logic. However the two executions will work differently in the master and
      the slaves, provided some unlucky timing happens.
      
      In the master the first time the key may still exist, while the second time
      the key may no longer exist. This will result in the key incremented just one
      time. However as a side effect the master will generate a synthetic
      `DEL` command in the replication channel in order to force the slaves to
      expire the key (given that key expiration is master-driven).
      
      When the same script will run in the slave, the key will no longer be
      there, so the script will not increment the key.
      
      The key idea used to implement the expire-at-first-lookup semantics was
      provided by Marc Gravell.
      b089ba98
  5. 10 Dec, 2013 1 commit
    • antirez's avatar
      dict.c: added optional callback to dictEmpty(). · 2eb781b3
      antirez authored
      Redis hash table implementation has many non-blocking features like
      incremental rehashing, however while deleting a large hash table there
      was no way to have a callback called to do some incremental work.
      
      This commit adds this support, as an optiona callback argument to
      dictEmpty() that is currently called at a fixed interval (one time every
      65k deletions).
      2eb781b3
  6. 05 Dec, 2013 1 commit
  7. 06 Nov, 2013 1 commit
  8. 05 Nov, 2013 6 commits
  9. 31 Oct, 2013 2 commits
  10. 28 Oct, 2013 2 commits
  11. 25 Oct, 2013 11 commits
  12. 09 Oct, 2013 1 commit
  13. 27 Jun, 2013 1 commit
  14. 28 Mar, 2013 1 commit
  15. 26 Mar, 2013 1 commit
    • antirez's avatar
      TTL / PTTL commands: two bugs fixed. · 873f328f
      antirez authored
      This commit fixes two corner cases for the TTL command.
      
      1) When the key was already logically expired (expire time older
      than current time) the command returned -1 instead of -2.
      
      2) When the key was existing and the expire was found to be exactly 0
      (the key was just about to expire), the command reported -1 (that is, no
      expire) instead of a TTL of zero (that is, about to expire).
      873f328f
  16. 21 Mar, 2013 1 commit
  17. 25 Feb, 2013 3 commits
  18. 22 Feb, 2013 1 commit