X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/57997664eaba82ad263c61b9cdbe7dd26ec8d08d..fec5a664f8ce7a1e0f687d07079aa09230fa5846:/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); }