summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-11-13 14:11:47 -0500
committerMatt Stancliff <matt@genges.com>2015-01-02 11:16:08 -0500
commit5e362b84ab8b769bf2738daea97b45a375d223f1 (patch)
treec17e1417c72aa07b8c0b5b7d6fc2bb31130cccbf /src/sort.c
parentd956d809acb848aec0f6524e1337d274a635980d (diff)
downloadredis-5e362b84ab8b769bf2738daea97b45a375d223f1.tar.gz
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
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sort.c b/src/sort.c
index 2b3276448..74b27cb67 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -220,7 +220,7 @@ void sortCommand(redisClient *c) {
if (sortval)
incrRefCount(sortval);
else
- sortval = createListObject();
+ sortval = createQuicklistObject();
/* The SORT command has an SQL-alike syntax, parse it */
while(j < c->argc) {
@@ -420,6 +420,7 @@ void sortCommand(redisClient *c) {
} else {
redisPanic("Unknown type");
}
+ printf("j: %d; vectorlen: %d\n", j, vectorlen);
redisAssertWithInfo(c,sortval,j == vectorlen);
/* Now it's time to load the right scores in the sorting vector */
@@ -509,7 +510,7 @@ void sortCommand(redisClient *c) {
}
}
} else {
- robj *sobj = createZiplistObject();
+ robj *sobj = createQuicklistObject();
/* STORE option specified, set the sorting result as a List object */
for (j = start; j <= end; j++) {