rediscala icon indicating copy to clipboard operation
rediscala copied to clipboard

ERR min or max is not a float (windows)

Open mendrik opened this issue 9 years ago • 3 comments

Hi,

not sure if this is the right place to report, but I installed redis for windows (3.0.501) and use it with latest 1.6.0 redis scala and I'm getting the following error:

'Caused by: redis.actors.ReplyErrorException: ERR min or max is not a float'

Would you happen to have an idea where this stems from? The bug doesn't happen on OSX with similar setup.

Cheers, Andreas

mendrik avatar Apr 13 '16 11:04 mendrik

No idea I would launch a redis-cli monitor in another terminal to see the commands http://redis.io/commands/MONITOR

etaty avatar Apr 13 '16 12:04 etaty

addendum, I have investigated this a bit further and tracked the bug down to the wrong serialization of java.lang.Double.POSITIVE_INFINITY under windows. So when using Limit(Double.PositiveInfinity) in some of the API calls, it will be serialized to "Infinitiy" but redis needs +inf or -inf. I have now changed my code to Limit(Double.MaxValue) instead and it works flawlessly. ZRANGEBYSCORE lock:all:is 1460581025807 Infinity (caused the bug) ZRANGEBYSCORE lock:all:is 1460581025807 +inf (works fine)

Still not sure if it should be fixed (as it seems to be some sort of VM issue rather).

mendrik avatar Apr 14 '16 09:04 mendrik

Thanks The fact that Infinity is sent, is wrong. We have a specific ByteStringDeserializer for Redis Long, I guess we need a serializer too.

etaty avatar Apr 14 '16 10:04 etaty