Skip to content
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

Inconsistent zset behaviour #34

Closed
dim opened this issue May 12, 2013 · 5 comments
Closed

Inconsistent zset behaviour #34

dim opened this issue May 12, 2013 · 5 comments
Assignees
Labels

Comments

@dim
Copy link

dim commented May 12, 2013

While scores of zsets can be floats, this is not consistently replicated. Example:

zset("myset", "k", 2.5)
zget("myset", "k") 
# => 2.5

zincr("myset", "k", 1) 
# => 3

zset("myset", "k", 2.5)
zscan("myset", "k", 0, 100, -1) 
# => [["k", 2]]

It would make sense to make zset scores consistently ints or floats.

@ghost ghost assigned ideawu May 12, 2013
@ideawu
Copy link
Owner

ideawu commented May 12, 2013

will fix in future version, zset scores are 64-bit integers.

@ideawu
Copy link
Owner

ideawu commented May 12, 2013

fixed since 1.4.2

@ideawu ideawu closed this as completed May 12, 2013
@hit9
Copy link

hit9 commented Sep 18, 2014

现在zset的score可以是float了吗

@ideawu
Copy link
Owner

ideawu commented Sep 18, 2014

你好, ssdb 的 zset 的 score 不能是 float, 只能是 int64.

@hit9
Copy link

hit9 commented Sep 18, 2014

嗯啊,为了减少数据的损失,我先乘以了一个100000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants