New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost number precision when saving to redis #135
Comments
What do you think about this solution:
Of course it not a full solution. just an idea, because there are may different type of numbers |
Interesting, it seems that the format result of
|
I guess the |
My updated proposal for a check:
|
@KSDaemon In your redis-cli example, you are using a string literal value instead of a number value. So why don't you just use a string value in Lua too? Lua's native numbers do not support 64-bit precision anyway. |
Hi!
I've found a vary bad thing... as i have investigated, lua-resty-redis loose 64bit number precision, when saving numbers to redis.
See examples below. Lets assume, we have a number
1824192940134586
REDIS CLI CODE
Everything works as expected
Now lets work with number through lua-resty-redis
NGINX LUA CODE
The text was updated successfully, but these errors were encountered: