History log of /redis-3.2.3/src/sort.c (Results 1 – 25 of 46)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: 8.0-m02, 6.2.16, 7.2.6, 7.4.1, 8.0-m01, 7.4.0, 7.4-rc2, 7.4-rc1, 7.2.5, 7.2.4, 7.0.15, 7.2.3, 7.2.2, 7.0.14, 6.2.14, 6.2.15, 7.2.1, 7.0.13, 7.2.0, 7.2-rc3, 7.0.12, 6.2.13, 6.0.20, 7.2-rc2, 6.0.19, 6.2.12, 7.0.11, 7.2-rc1, 7.0.10, 7.0.9, 6.2.11, 6.0.18, 6.2.10, 6.0.17, 6.2.9, 7.0.8, 7.0.7, 7.0.6, 6.2.8, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 7.0.0, 6.2.7, 7.0-rc3, 7.0-rc2, 7.0-rc1, 6.2.6, 6.0.16, 5.0.14, 5.0.13, 6.0.15, 6.2.5, 6.0.14, 6.2.4, 6.2.3, 6.0.13, 6.2.2, 6.2.1, 6.0.12, 5.0.12, 6.0.11, 6.2.0, 5.0.11, 6.2-rc3, 6.0.10, 6.2-rc2, 6.2-rc1, 6.0.9, 5.0.10, 6.0.8, 6.0.7, 6.0.6, 6.0.5, 6.0.4, 6.0.3, 6.0.2, 6.0.1, 6.0.0, 5.0.9, 6.0-rc4, 6.0-rc3, 5.0.8, 6.0-rc2, 6.0-rc1, 5.0.7, 5.0.6, 5.0.5, 3.2.13, 4.0.14, 5.0.4, 4.0.13, 5.0.3, 4.0.12, 5.0.2, 5.0.1, 5.0.0, 5.0-rc6, 5.0-rc5, 4.0.11, 5.0-rc4, 5.0-rc3, 5.0-rc2, 4.0.10, 3.2.12, 5.0-rc1, 4.0.9, 4.0.8, 4.0.7, 4.0.6, 4.0.5, 4.0.4, 4.0.3, 3.2.11, 4.0.2, 3.2.10, 4.0.1, 4.0.0, 3.2.9, 4.0-rc3, 3.2.8, 3.2.7, 3.2.6, 4.0-rc2, 4.0-rc1, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.2.0-rc3, 3.0.7, 3.2.0-rc2, 3.2-rc1, 3.0.6, 2.8.24, 3.0.5, 2.8.23, 2.8.22, 3.0.4
# 32f80e2f 27-Jul-2015 antirez <[email protected]>

RDMF: More consistent define names.


# 40eb548a 26-Jul-2015 antirez <[email protected]>

RDMF: REDIS_OK REDIS_ERR -> C_OK C_ERR.


# 2d9e3eb1 26-Jul-2015 antirez <[email protected]>

RDMF: redisAssert -> serverAssert.


# 14ff5724 26-Jul-2015 antirez <[email protected]>

RDMF: OBJ_ macros for object related stuff.


# 554bd0e7 26-Jul-2015 antirez <[email protected]>

RDMF: use client instead of redisClient, like Disque.


# cef054e8 26-Jul-2015 antirez <[email protected]>

RDMF (Redis/Disque merge friendlyness) refactoring WIP 1.


Revision tags: 3.0.3, 3.0.2, 2.8.21
# 575eeb1a 21-May-2015 Itamar Haber <[email protected]>

Removed incorrect suggestion

DEL/INCR/DECR and others could be NTH but apparently never made it to the implementation of SORT


Revision tags: 2.8.20, 3.0.1, 3.0.0, 3.0.0-rc6, 3.0.0-rc5, 3.0.0-rc4
# 719c6c2b 03-Feb-2015 antirez <[email protected]>

Suppress sign warning in sort.c.

Related to #2346.


# 96abf659 03-Feb-2015 antirez <[email protected]>

Hopefully better sort.c optimization comments.

Related to #2346.


# c908774b 02-Feb-2015 Sun He <[email protected]>

sort.c: REDIS_LIST's dontsort optimization

also fix the situation "dontsort DESC" of a list


Revision tags: 3.0.0-rc3, 3.0.0-rc2, 2.8.19, 2.8.18
# 5e362b84 13-Nov-2014 Matt Stancliff <[email protected]>

Add quicklist implementation

This replaces individual ziplist vs. linkedlist representations
for Redis list operations.

Big thanks for all the reviews and feedback from everybody in
https://github.

Add quicklist implementation

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

show more ...


# 3cd36a4d 11-Dec-2014 antirez <[email protected]>

SORT: Don't sort Set elements if not needed.

Related to #2094.


# 6c0abc4a 23-Oct-2014 Matt Stancliff <[email protected]>

Fix zero-ordering SORT when called against lists

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 requ

Fix zero-ordering SORT when called against lists

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)

show more ...


Revision tags: 3.0.0-rc1, 2.8.17, 2.8.16, 2.8.15, 2.8.14, 3.0.0-beta8, 2.8.13, 3.0.0-beta7, 2.8.12, 2.8.11, 3.0.0-beta6, 2.8.10, 3.0.0-beta5, 3.0.0-beta4, 3.0.0-beta3, 2.8.9, 2.8.8, 3.0.0-beta2
# 3e1d7726 10-Mar-2014 antirez <[email protected]>

Cluster: don't allow BY option of SORT as well.

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 poss

Cluster: don't allow BY option of SORT as well.

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.

show more ...


# 03344196 10-Mar-2014 antirez <[email protected]>

Cluster: don't allow GET option in cluster mode.

The commit also refactors a bit the error handling during SORT option
parsing.


# 8caecc9a 10-Mar-2014 antirez <[email protected]>

Fixed memory leak in SORT LIMIT option argument parsing on error.


Revision tags: 2.8.7, 2.8.6, 3.0.0-beta1, 2.8.5, 2.8.4, 2.6.17, 2.8.3
# 11e81a1e 05-Dec-2013 antirez <[email protected]>

Fixed grammar: before H the article is a, not an.


Revision tags: 2.8.2, 2.8.1, 2.8.0, 2.8.0-rc6, 2.8.0-rc5, 2.8.0-rc4, 2.6.16, 2.6.15, 2.8.0-rc3, 2.8.0-rc2, 2.8.0-rc1, 2.6.14-2, 2.6.14-1, 2.6.14, 2.6.13, 2.6.12, 2.6.10-3, 2.6.10-2, 2.6.11, 2.6.10-1, 2.6.10, 2.6.9-1, 2.6.9, 2.6.8-1, 2.6.8, 2.6.7-1, 2.6.7, 2.6.6, 2.4.18, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.6.0-rc8, 2.6.0-rc7, 2.4.17, 2.6.0-rc6, 2.4.16, 2.4.15, 2.6.0-rc5, 2.6.0-rc4
# 894eba07 05-Jun-2012 antirez <[email protected]>

Introduction of a new string encoding: EMBSTR

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

Introduction of a new string encoding: EMBSTR

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.

show more ...


# cf1579a7 12-Jul-2013 antirez <[email protected]>

SORT ALPHA: use collation instead of binary comparison.

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

SORT ALPHA: use collation instead of binary comparison.

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.

show more ...


# fce016d3 25-Jan-2013 antirez <[email protected]>

Keyspace events: it is now possible to select subclasses of events.

When keyspace events are enabled, the overhead is not sever but
noticeable, so this commit introduces the ability to select subcla

Keyspace events: it is now possible to select subclasses of events.

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.

show more ...


# da04e6ed 24-Jan-2013 antirez <[email protected]>

Keyspace events added for more commands.


# 9d09ce39 16-Jan-2013 guiquanz <[email protected]>

Fixed many typos.


# 4365e5b2 08-Nov-2012 antirez <[email protected]>

BSD license added to every C source and header file.


# 9a914a63 03-Oct-2012 antirez <[email protected]>

"SORT by nosort" (skip sorting) respect sorted set ordering.

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 out

"SORT by nosort" (skip sorting) respect sorted set ordering.

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.

show more ...


# 36741b2c 04-Sep-2012 antirez <[email protected]>

Scripting: Force SORT BY constant determinism inside SORT itself.

SORT is able to return (faster than when ordering) unordered output if
the "BY" clause is used with a constant value. However we try

Scripting: Force SORT BY constant determinism inside SORT itself.

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 ;)

show more ...


12