- 04 May, 2015 1 commit
-
-
antirez authored
Should not be an issue given that the precision is the second here, at least if we are using a decent HZ value and the cached time refreshes enough times. So the cached time is only used if HZ is >= 10.
-
- 29 Apr, 2015 1 commit
-
-
antirez authored
When the key expires far in the future compared to the cached time in server.mstime, calling mstime(), that calls gettimeofday(), should not be very useful. Instead when we are near the expire, we want the additional precision. This commit is related to issue #2552.
-
- 03 Dec, 2014 1 commit
-
-
antirez authored
Ref: issue #2175
-
- 10 Sep, 2014 1 commit
-
-
xiaost authored
*SCAN will cause redis server to hang for seconds after millions of keys was deleted by SCAN/DEL pairs
-
- 27 Aug, 2014 2 commits
-
-
antirez authored
-
Matt Stancliff authored
Previously, "MOVE key somestring" would move the key to DB 0 which is just unexpected and wrong. String as DB == error. Test added too. Modified by @antirez in order to use the getLongLongFromObject() API instead of strtol(). Fixes #1428
-
- 26 Jun, 2014 1 commit
-
-
antirez authored
-
- 09 Jun, 2014 1 commit
-
-
Matt Stancliff authored
Behrad Zari discovered [1] and Josiah reported [2]: if you block and wait for a list to exist, but the list creates from a non-push command, the blocked client never gets notified. This commit adds notification of blocked clients into the DB layer and away from individual commands. Lists can be created by [LR]PUSH, SORT..STORE, RENAME, MOVE, and RESTORE. Previously, blocked client notifications were only triggered by [LR]PUSH. Your client would never get notified if a list were created by SORT..STORE or RENAME or a RESTORE, etc. Blocked client notification now happens in one unified place: - dbAdd() triggers notification when adding a list to the DB Two new tests are added that fail prior to this commit. All test pass. Fixes #1668 [1]: https://groups.google.com/forum/#!topic/redis-db/k4oWfMkN1NU [2]: #1668
-
- 23 Apr, 2014 1 commit
-
-
Matt Stancliff authored
Deleting an expired key should return 0, not success. Fixes #1648
-
- 16 Apr, 2014 1 commit
-
-
antirez authored
All the Redis functions that need to modify the string value of a key in a destructive way (APPEND, SETBIT, SETRANGE, ...) require to make the object unshared (if refcount > 1) and encoded in raw format (if encoding is not already REDIS_ENCODING_RAW). This was cut & pasted many times in multiple places of the code. This commit puts the small logic needed into a function called dbUnshareStringValue().
-
- 07 Feb, 2014 1 commit
-
-
antirez authored
-
- 03 Feb, 2014 1 commit
-
-
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.
-
- 10 Dec, 2013 1 commit
-
-
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).
-
- 05 Dec, 2013 1 commit
-
-
antirez authored
-
- 05 Nov, 2013 6 commits
-
-
antirez authored
Thanks to @badboy for reporting it.
-
antirez authored
The previous implementation of SCAN parsed the cursor in the generic function implementing SCAN, SSCAN, HSCAN and ZSCAN. The actual higher-level command implementation only checked for empty keys and return ASAP in that case. The result was that inverting the arguments of, for instance, SSCAN for example and write: SSCAN 0 key Instead of SSCAN key 0 Resulted into no error, since 0 is a non-existing key name very likely. Just the iterator returned no elements at all. In order to fix this issue the code was refactored to extract the function to parse the cursor and return the error. Every higher level command implementation now parses the cursor and later checks if the key exist or not.
-
antirez authored
The previous implementation assumed that the first call always happens with cursor set to 0, this may not be the case, and we want to return 0 anyway otherwise the (broken) client code will loop forever.
-
antirez authored
-
antirez authored
This fixes issue #1360 and #1362.
-
antirez authored
-
- 31 Oct, 2013 3 commits
- 29 Oct, 2013 13 commits
-
-
antirez authored
-
antirez authored
The new implementation is capable of iterating the keyspace but also sets, hashes, and sorted sets, and can be used to implement SSCAN, ZSCAN and HSCAN.
-
antirez authored
-
antirez authored
-
antirez authored
-
antirez authored
-
antirez authored
-
antirez authored
-
antirez authored
-
antirez authored
-
Pieter Noordhuis authored
-
Pieter Noordhuis authored
-
- 27 Jun, 2013 1 commit
-
-
antirez authored
-
- 28 Mar, 2013 1 commit
-
-
antirez authored
-
- 26 Mar, 2013 1 commit
-
-
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).
-
- 12 Feb, 2013 1 commit
-
-
antirez authored
-