dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.99k stars 956 forks source link

implement SORT_RO #3886

Open adiholden opened 1 month ago

adiholden commented 1 month ago

Implement this command inside Dragonfly according the to the Valkey spec: https://valkey.io/commands/sort_ro/

SalmanDeveloperz commented 1 month ago

Hi, Could you please provide the description of issue?

romange commented 1 month ago

Implement this command inside Dragonfly according the to the Valkey spec: https://valkey.io/commands/sort_ro/

SalmanDeveloperz commented 1 month ago

Hi,

I’m working on implementing thesort_ro command as per the Valkey spec, but I’m unsure where exactly in the project I should apply the changes. Could you point me to the specific files or modules that handle command definitions and execution within Dragonfly?

I’ve reviewed some parts of the project related to command handling, but I want to make sure I’m working in the right place before I proceed.

Thanks for your help!

chakaz commented 1 month ago

Hi @SalmanDeveloperz, this is where we implement our current SORT command: https://github.com/dragonflydb/dragonfly/blob/5efc8f11d2c4f6c5c3ad9a7069bf67af19befe9d/src/server/generic_family.cc#L1167

Reading the code now, I see that it actually does not support the STORE flag (which makes SORT a write-command, and which is not supported by the read-only SORT_RO command).

We should have a similar (preferably with code reuse) version which acts like the current one, and add STORE support to existing SORT command.