• antirez's avatar
    lookupKeyByPattern() used by SORT GET/BY rewritten. Fixes issue #460. · 3c25c4a6
    antirez authored
    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.
    3c25c4a6
sort.c 15.3 KB