X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/3d24304ff930fd3392a63b79ed6037ebab94b742..40531be0e338556df5510f49f4472ea50713962f:/src/sort.c diff --git a/src/sort.c b/src/sort.c index a44a6d63..ff275c95 100644 --- a/src/sort.c +++ b/src/sort.c @@ -199,6 +199,9 @@ void sortCommand(redisClient *c) { j++; } + /* Destructively convert encoded sorted sets for SORT. */ + if (sortval->type == REDIS_ZSET) zsetConvert(sortval, REDIS_ENCODING_SKIPLIST); + /* Load the sorting vector with all the objects to sort */ switch(sortval->type) { case REDIS_LIST: vectorlen = listTypeLength(sortval); break; @@ -368,7 +371,7 @@ void sortCommand(redisClient *c) { * SORT result is empty a new key is set and maybe the old content * replaced. */ server.dirty += 1+outputlen; - touchWatchedKey(c->db,storekey); + signalModifiedKey(c->db,storekey); addReplyLongLong(c,outputlen); }