Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
zinterstore fails when mixing sets and sorted sets #516
I have two sets and a single sorted set and I'm trying to use zinterstore to get the scored intersection of all three. The operation is failing with my production data but succeeding if I substitute a test sorted set it works in some cases but not all and I'm stumped about why.
To setup the test, add three entries to set "one", four entries to set "two" - including a signle entry that exists in set "one", and four entries in the sorted set - including that same single entry from set "one"
Now if you run
Nothing is found to intersect.
Create a new sort set "four":
There is an intersection on the entry 100!
My production data isn't so simple but I'm seeing the same result, some intersections appear to work, at least in part, but others fail completely.
This happens on redis versions 2.4.13 and the latest 2.6 RC.
Josiah Carlson kindly tested this and found that it behaves correctly in earlier versions of redis: