Fix RJC zRevRangeWithScores returns incorrect results

DATAREDIS-137
This commit is contained in:
Jennifer Hickey
2013-04-01 10:27:39 -07:00
parent 97ebd34b2d
commit a421238403
3 changed files with 2 additions and 12 deletions

View File

@@ -1670,16 +1670,14 @@ public class RjcConnection implements RedisConnection {
public Set<Tuple> zRevRangeWithScores(byte[] key, long start, long end) {
String stringKey = RjcUtils.decode(key);
String minString = Long.toString(start);
String maxString = Long.toString(end);
try {
if (isPipelined()) {
pipeline.zrevrangeByScoreWithScores(stringKey, minString, maxString);
pipeline.zrevrangeWithScores(stringKey, (int) start, (int) end);
return null;
}
return RjcUtils.convertElementScore(session.zrevrangeByScoreWithScores(stringKey, minString, maxString));
return RjcUtils.convertElementScore(session.zrevrangeWithScores(stringKey, (int) start, (int) end));
} catch (Exception ex) {
throw convertRjcAccessException(ex);
}