]> git.saurik.com Git - redis.git/commit
lookupKeyByPattern() used by SORT GET/BY rewritten. Fixes issue #460.
authorantirez <antirez@gmail.com>
Tue, 17 Apr 2012 11:05:09 +0000 (13:05 +0200)
committerantirez <antirez@gmail.com>
Tue, 17 Apr 2012 11:05:09 +0000 (13:05 +0200)
commit3c25c4a691aec646cfdc3f840f356ef3bb5840c0
tree5e2b25ba94d078f3e2f3dd52c8775eca11850ffe
parent0705ff3f04379c4e9f95999f3eefe0282aeb87a5
lookupKeyByPattern() used by SORT GET/BY rewritten. Fixes issue #460.

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.
src/sort.c