- 27 Jul, 2015 1 commit
-
-
antirez authored
-
- 26 Jul, 2015 5 commits
- 21 May, 2015 1 commit
-
-
Itamar Haber authored
DEL/INCR/DECR and others could be NTH but apparently never made it to the implementation of SORT
-
- 03 Feb, 2015 2 commits
- 02 Feb, 2015 1 commit
-
-
Sun He authored
also fix the situation "dontsort DESC" of a list
-
- 02 Jan, 2015 1 commit
-
-
Matt Stancliff authored
This replaces individual ziplist vs. linkedlist representations for Redis list operations. Big thanks for all the reviews and feedback from everybody in https://github.com/antirez/redis/pull/2143
-
- 11 Dec, 2014 1 commit
-
-
antirez authored
Related to #2094.
-
- 29 Oct, 2014 1 commit
-
-
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)
-
- 10 Mar, 2014 3 commits
-
-
antirez authored
There is the exception of a "constant" BY pattern that is used in order to signal to don't sort at all. In this case no lookup is needed so it is possible to support this case in Cluster mode.
-
antirez authored
The commit also refactors a bit the error handling during SORT option parsing.
-
antirez authored
-
- 05 Dec, 2013 1 commit
-
-
antirez authored
-
- 22 Jul, 2013 1 commit
-
-
antirez authored
Previously two string encodings were used for string objects: 1) REDIS_ENCODING_RAW: a string object with obj->ptr pointing to an sds stirng. 2) REDIS_ENCODING_INT: a string object where the obj->ptr void pointer is casted to a long. This commit introduces a experimental new encoding called REDIS_ENCODING_EMBSTR that implements an object represented by an sds string that is not modifiable but allocated in the same memory chunk as the robj structure itself. The chunk looks like the following: +--------------+-----------+------------+--------+----+ | robj data... | robj->ptr | sds header | string | \0 | +--------------+-----+-----+------------+--------+----+ | ^ +-----------------------+ The robj->ptr points to the contiguous sds string data, so the object can be manipulated with the same functions used to manipulate plan string objects, however we need just on malloc and one free in order to allocate or release this kind of objects. Moreover it has better cache locality. This new allocation strategy should benefit both the memory usage and the performances. A performance gain between 60 and 70% was observed during micro-benchmarks, however there is more work to do to evaluate the performance impact and the memory usage behavior.
-
- 12 Jul, 2013 1 commit
-
-
antirez authored
Note that we only do it when STORE is not used, otherwise we want an absolutely locale independent and binary safe sorting in order to ensure AOF / replication consistency. This is probably an unexpected behavior violating the least surprise rule, but there is currently no other simple / good alternative.
-
- 28 Jan, 2013 2 commits
-
-
antirez authored
When keyspace events are enabled, the overhead is not sever but noticeable, so this commit introduces the ability to select subclasses of events in order to avoid to generate events the user is not interested in. The events can be selected using redis.conf or CONFIG SET / GET.
-
antirez authored
-
- 19 Jan, 2013 1 commit
-
-
guiquanz authored
-
- 08 Nov, 2012 1 commit
-
-
antirez authored
-
- 03 Oct, 2012 1 commit
-
-
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.
-
- 04 Sep, 2012 1 commit
-
-
antirez authored
SORT is able to return (faster than when ordering) unordered output if the "BY" clause is used with a constant value. However we try to play well with scripting requirements of determinism providing always sorted outputs when SORT (and other similar commands) are called by Lua scripts. However we used the general mechanism in place in scripting in order to reorder SORT output, that is, if the command has the "S" flag set, the Lua scripting engine will take an additional step when converting a multi bulk reply to Lua value, calling a Lua sorting function. This is suboptimal as we can do it faster inside SORT itself. This is also broken as issue #545 shows us: basically when SORT is used with a constant BY, and additionally also GET is used, the Lua scripting engine was trying to order the output as a flat array, while it was actually a list of key-value pairs. What we do know is to recognized if the caller of SORT is the Lua client (since we can check this using the REDIS_LUA_CLIENT flag). If so, and if a "don't sort" condition is triggered by the BY option with a constant string, we force the lexicographical sorting. This commit fixes this bug and improves the performance, and at the same time simplifies the implementation. This does not mean I'm smart today, it means I was stupid when I committed the original implementation ;)
-
- 18 Apr, 2012 1 commit
-
-
antirez authored
just fieldobj itself as sentinel of the fact a field object is used or not, instead of using the filed length, that may be confusing both for people and for the compiler emitting a warning.
-
- 17 Apr, 2012 1 commit
-
-
antirez authored
lookupKeyByPattern() was implemented with a trick to speedup the lookup process allocating two fake Redis obejcts on the stack. However now that we propagate expires to the slave as DEL operations the lookup of the key may result into a call to expireIfNeeded() having the stack allocated object as argument, that may in turn use it to create the protocol to send to the slave. But since this fake obejcts are inherently read-only this is a problem. As a side effect of this fix there are no longer size limits in the pattern to be used with GET/BY option of SORT. See https://github.com/antirez/redis/issues/460 for bug details.
-
- 01 Feb, 2012 2 commits
-
-
antirez authored
Make SORT BY <constant> STORE ... to always produce the same output by force sorting, so that we have deterministic replication of this command.
-
antirez authored
SORT is now more deterministic: does not accept to compare by score items that have scores not representing a valid double. Also items with the same score are compared lexycographically. At the same time the scripting side introduced the ability to sort the output of SORT when sort uses the BY <constant> optimization, resulting in no specific ordering. Since in this case the user may use GET, and the result of GET can be null, converted into false as Lua data type, this commit also introduces the ability to sort Lua tables containining false, only if the first (faster) attempt at using just table.sort with a single argument fails.
-
- 30 Jan, 2012 1 commit
-
-
Michal Kwiatkowski authored
-
- 19 Dec, 2011 1 commit
-
-
BigCat authored
Using `getLongFromObjectOrReply` instead of `atoi` if possible. The following functions are modified. * lrangeCommand * ltrimCommand * lremCommand * lindexCommand * lsetCommand * zunionInterGenericCommand * genericZrangebyscoreCommand * sortCommand
-
- 01 Dec, 2011 1 commit
-
-
antirez authored
-
- 08 Nov, 2011 1 commit
-
-
antirez authored
-
- 04 Oct, 2011 1 commit
-
-
antirez authored
-
- 20 Jun, 2011 1 commit
-
-
antirez authored
-
- 06 Apr, 2011 1 commit
-
-
Pieter Noordhuis authored
-
- 14 Mar, 2011 1 commit
-
-
Pieter Noordhuis authored
-
- 29 Dec, 2010 1 commit
-
-
antirez authored
touched key for WATCH refactored into a more general thing that can be used also for the cache system. Some more changes towards diskstore working.
-
- 10 Dec, 2010 1 commit
-
-
antirez authored
HGET HMGET are now COW friendly, plus API refactoring and changes needed for the new implementation.
-
- 09 Dec, 2010 1 commit
-
-
antirez authored
-