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

Support ZRANGESTORE Command in Dragonfly #3742

Open
atx-skn opened this issue Sep 19, 2024 · 2 comments
Open

Support ZRANGESTORE Command in Dragonfly #3742

atx-skn opened this issue Sep 19, 2024 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@atx-skn
Copy link

atx-skn commented Sep 19, 2024

Is your feature request related to a problem? Please describe.
We tried using Dragonfly as an alternative to Redis. While it worked well overall, it does not support the ZRANGESTORE command, which is crucial for us to create mutex locks within a transaction. We limit the number of requests used for creating a lock by storing some in a temporary cache with ZRANGESTORE. This command would allow us to create locks in a transaction, ensuring ACID compliance.

Describe the solution you'd like
Support for the ZRANGESTORE command, which has been available since Redis 6.2.0.

Describe alternatives you've considered
Without this command, we would need to store the result of ZRANGE in a variable and insert it afterward. While this could be done transactionally using a LUA script, it does not provide the benefits of a true transaction.

@chakaz
Copy link
Collaborator

chakaz commented Sep 19, 2024

@websquadpro I have reported your comment as spam and removed it.

@dragonflydb dragonflydb deleted a comment Sep 19, 2024
@chakaz
Copy link
Collaborator

chakaz commented Sep 19, 2024

Hi @atx-skn
Thanks for reporting this issue.
Indeed, ZRANGESTORE is one of the last few commands yet unsupported by Dragonfly.
While we do want to implement this, it is currently not planned for the upcoming releases.
If you can code in C++, you may attempt to implement this yourself. The building blocks are there, and I am happy to review and guide you through it.

Without this command, we would need to store the result of ZRANGE in a variable and insert it afterward. While this could be done transactionally using a LUA script, it does not provide the benefits of a true transaction.

Actually, Lua scripts are transactions in Dragonfly, unless one specified non-atomic Lua mode (which is not the default). So feel free to use that as a workaround for now, but I agree that it's less convenient and less efficient than the native command.

@adiholden adiholden added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants