redis-rb icon indicating copy to clipboard operation
redis-rb copied to clipboard

zinterstore doesn't respect namespacing

Open aimee-ault opened this issue 12 years ago • 3 comments

All other sorted set methods prepend namespace properly to the key, but zinterstore does not seem to get this right on outputting to a new sorted set or lookup on the sets being compared.

For example,if my redis object were setup to use a namespace called "leaderboard":

redis.zadd("a", delta, user_id) redis.zadd("b", delta, user_id)

zadd would add this record to keys named leaderboard_a and leaderboard_b, respectively.

However: redis.zinterstore("output", ["a", "b"])

Fails, because it does not correctly look for the namespaced key, but rather just "a", which does not exist.

aimee-ault avatar Jun 21 '14 19:06 aimee-ault

I'd gladly accept a pull-request :)

yaauie avatar Jun 21 '14 19:06 yaauie

Opened over here, didn't realize it was an issue with the namespace gem instead, but I think you manage that one as well, @yaauie?

https://github.com/resque/redis-namespace/pull/89

aimee-ault avatar Jun 21 '14 19:06 aimee-ault

Ha. Yep. Closing this issue & will address in the right place :)

yaauie avatar Jun 21 '14 20:06 yaauie