Question about sorted sets

I recently migrated from Redis to Dragonfly and noticed that I had to switch how I read from my Sorted set.

I used to be able to just get the range from 0 - 1 in dragonfly I need to do -2 -1, is there some reason why its doesn’t work in the same way as with Redis?
Or whether I missed some documentation about it

if you need to change the way you access your sorted sets it’s a bug

can you please share with us the contents of this key?

@munificent-gnu please run the following redis-cli -D "" --raw dump leaderboard_xp > key.dump

and attach this file here

thanks for reaching out

sure

should I dump it from the redis db or dragonfly or both

here is both
key_dfly.dump (466 KB)

key_redis.dump (466 KB)

Also what I saw is that it seems like my DB purges itself after some time, is it fine to delete the redis dump after loading it into dragonfly?

or can I enabled some debug flag to show why the keys get deleted, I am not using the cache mode

Do they have TTL set on them?

Hi @munificent-gnu - I’m trying to reproduce this with the files you’ve uploaded. I wonder at what level the bug is - is it intentional that there are -1 scores in the zset?

Yes it is

Ttl is set to -1 when checking it in dragonfly

@munificent-gnu I’m currently debugging this, I’ll reach out if I need anything else

Sounds great, thanks

@munificent-gnu we’ve been able to fix the issue: https://github.com/dragonflydb/dragonfly/pull/2075
The fix should be included in the next release, and by then we should be compatible with Redis
I’m sorry that this will cause you to change again the command you use with Dragonfly, but at least now it wouldn’t be buggy anymore :slightly_smiling_face:
Thanks for the report!

No worries, thank you very much for the great support