We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
在使用 RedisShake 迁移 Redis 数据时,发现 ZSet 类型的 score 值出现精度丢失问题。
{"level":"debug","time":"2025-03-21T11:00:52+08:00","message":"function before: zadd test_key_17605 0.097932 QAkRRSnlno0nkJQt0k7O3euWdV95lCZYHqaZ"} {"level":"debug","time":"2025-03-21T11:00:52+08:00","message":"function after: [zadd test_key_17605 0.097932 QAkRRSnlno0nkJQt0k7O3euWdV95lCZYHqaZ]"} {"level":"debug","time":"2025-03-21T11:00:52+08:00","message":"[writer_127.0.0.1_6380] send cmd. cmd=[zadd test_key_17605 0.097932 QAkRRSnlno0nkJQt0k7O3euWdV95lCZYHqaZ]"}
源实例: 127.0.0.1:6380> zrange test_key_17605 0 -1 WITHSCORES 1) "QAkRRSnlno0nkJQt0k7O3euWdV95lCZYHqaZ" 2) "0.09793150749791057"
RedisShake/internal/rdb/types/zset.go
Line 61 in 4a24a47
The text was updated successfully, but these errors were encountered:
是这样的👍 有兴趣帮修一下吗
Sorry, something went wrong.
好的,我修下
fix(zset): preserve double precision during migration (tair-opensourc…
2cf3093
…e#939) This commit resolves the ZSET score truncation issue caused by using `%f` format specifier, which led to loss of precision for double values.
No branches or pull requests
问题描述(Issue Description)
在使用 RedisShake 迁移 Redis 数据时,发现 ZSet 类型的 score 值出现精度丢失问题。
环境信息(Environment)
RedisShake 日志信息
其他信息(Additional Information)
RedisShake/internal/rdb/types/zset.go
Line 61 in 4a24a47
在处理 ZSet 数据时使用了 fmt.Sprintf("%f", score) 格式化浮点数,这种格式化方式默认只保留 6 位小数,导致精度丢失。
The text was updated successfully, but these errors were encountered: