gregoriusxu / booksleeve

Automatically exported from code.google.com/p/booksleeve
Other
0 stars 0 forks source link

Incorrect score returned when using SortedSets.Range #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add an item to a sorted set with a score greater than Int32.MaxValue
conn.SortedSets.Add(3, "zset", "abc", DateTime.Now.Ticks);

2. Retreive said item and score using Range
var range = conn.SortedSets.Range(3, "zset", 0, -1);

What is the expected output? What do you see instead?
Expected: 634614442154715759
Actual: -2147483648

What version of the product are you using? On what operating system?
1.1.0.3 on Windows 7, Redis 2.4.5 on Linux

Please provide any additional information below.

Original issue reported on code.google.com by jame...@gmail.com on 5 Jan 2012 at 9:59

GoogleCodeExporter commented 8 years ago
Looking further, in RedisResult.cs line 164 the ValueDouble is cast to an int. 
This seems to be the root cause, but not sure if this is a bug or if the case 
is required for some other use case.

Original comment by jame...@gmail.com on 5 Jan 2012 at 10:08

GoogleCodeExporter commented 8 years ago
I will check - thanks

Original comment by marc.gravell on 5 Jan 2012 at 11:06

GoogleCodeExporter commented 8 years ago
This is fixed in 1.1.0.4 - thanks for reporting it and investigating further 
(you were entirely correct)

Original comment by marc.gravell on 6 Jan 2012 at 11:32

GoogleCodeExporter commented 8 years ago

Original comment by marc.gravell on 6 Jan 2012 at 11:32