You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/05/19 12:17:22 UTC

[GitHub] [incubator-kvrocks] ShooterIT opened a new issue, #595: You can help Kvrocks to support more Redis commands

ShooterIT opened a new issue, #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/issues) and found no similar issues.
   
   
   ### Motivation
   
   Now Kvrocks only support most commands of Redis 4.0 version. Here are supported commands https://github.com/apache/incubator-kvrocks/wiki/Support-Commands.
   
   But now Redis is 7.0, developers want us to support some useful commands to make development easier.  Just a few of us is not enough to implement so many command. To make this project better, we need your help!
   
   ### Solution
   
   If you want to implement one command, you add one comment here.
   
   such as 
   > try to implement `substr` command
   
   If no body is doing this or oppose this in three days, you can go ahead.
   
   
   Here are the basic steps to implement a new command for your reference.
   1. Add one command item into `redisCommandTable` in `redis_cmd.cc`
   2. Implement the XxxCommander of your command in `redis_xx.cc`(`redis_hash.cc`, `redis_list.cc`, `redis_zset.cc`, ...), you can refer other similar commands
   3. [Optional] Add TCL tests  like Redis if you are familiar with TCL.
   4. [Optional] Adapt slot migration and kvrocks2redis tool, we can supplement it after merging your PR if you are 
   not  familiar with these separate themes.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] You can help Kvrocks to support more Redis commands [kvrocks]

Posted by "Valay17 (via GitHub)" <gi...@apache.org>.
Valay17 commented on issue #595:
URL: https://github.com/apache/kvrocks/issues/595#issuecomment-3691078806

   Thank you, I am looking into the codebase for choosing commands to begin my first contribution and this gives me more idea on what is the plan of the project.
   
   Few questions:
   1. When you say not planned, does it mean that these features are considered as not required due to design choices the project has made or they are not in scope of the project or some other reasons?
    
   2. As I am checking the workflow of the code, if I understand correctly it goes something like this:- Design and discuss under issue for new command, implement in command parsing/execution and storage algorithms, unit testing and publish PR. Could you please confirm if this is correct?
   
   3. As for tests, it says to test for both C++ and GoLang, I don’t have much experience with Go. Could you provide any suggestions on how to approach writing test cases in Go? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] You can help Kvrocks to support more Redis commands [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/kvrocks/issues/595#issuecomment-3691027065

   My organized list:
   - ACL commands: #2415 
   - BGREWRITEAOF: not planned (no AOF in Kvrocks)
   - CLIENT subcommands: TBD (partial)
   - CLUSTER subcomamnds: for most of them, not planned (different cluster architecture)
   - COMMAND subcomamnds: TBD (partial)
   - DELEX: #3310 
   - DIGEST: #3309 
   - FAILOVER: TBD
   - FT subcommands: TBD (partial)
   - FUNCTION subcommands: TBD (partial)
   - hash expiration: #2269 
   - JSON.DEBUG: not planned
   - LATENCY: TBD
   - LOLWUT: not planned?
   - MEMORY subcommands: not planned?
   - MODULE: not planned
   - MSETEX: #3307 
   - OBJECT subcommands: TBD
   - PF commands: TBD (partial)
   - PUBSUB subcommands: TBD (partial)
   - PSYNC: not planned
   - REPLCONF: not planned
   - SAVE: not planned?
   - SCRIPT subcommands: TBD (partial)
   - SLOWLOG subcommands: TBD (partial)
   - SMISMEMBER: supported
   - SORT_RO: supported
   - SPUBLISH: #3306 
   - SWAPDB: TBD
   - SYNC: not planned
   - TOUCH: not planned
   - TS commands: TBD (partial)
   - VECTOR commands: TBD
   - WAITAOF: not planned
   - stream commands: TBD (partial)
   - ZDIFF, ZDIFFSTORE: supported
   
   cc @git-hulk 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] boatrainlsz commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
boatrainlsz commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1310420199

   try to implement `SINTERCARD` command, see #1083  for more details


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1131678054

   Seems like that the grammar of redis commands can be parsed by an LL(1) parser.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1131665308

   > Here an issue #456 is needed to resolve
   
   I feel that it might be a bit too cumbersome to operate a `vector<string>` for each command to parse, and there would be a lot of duplicated logic. It might be nice to design some unified abstraction, but I haven't figured out how to do that yet.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] You can help Kvrocks to support more Redis commands [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/kvrocks/issues/595#issuecomment-3691120127

   > When you say not planned, does it mean that these features are considered as not required due to design choices the project has made or they are not in scope of the project or some other reasons?
   
   mostly, it's not planned because these commands are not useful or can not/hardly be implemented due to the difference between redis and kvrocks.
   
   > Design and discuss under issue for new command, implement in command parsing/execution and storage algorithms, unit testing and publish PR
   
   yup. large features may require an additional proposal though.
   
   > Could you provide any suggestions on how to approach writing test cases in Go?
   
   I think these golang test cases are quite trivial and you can write them after checking the golang tutorial even you didn't learn go before.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] You can help Kvrocks to support more Redis commands [kvrocks]

Posted by "townseggs (via GitHub)" <gi...@apache.org>.
townseggs commented on issue #595:
URL: https://github.com/apache/kvrocks/issues/595#issuecomment-3994857348

   Thanks for the updates! I'm really looking forward to the support for Hash Field Expiration (HEXPIRE, etc.).
   
   In many business scenarios, we currently have to maintain a manual "secondary index" or auxiliary keys just to handle expiration for individual fields within a Hash. This adds a lot of complexity to ensure consistency.
   
   Having native support for this in Kvrocks would be a game-changer for us, as it would significantly simplify the architecture by eliminating the need for those custom indexing workarounds. Excited to see this move forward!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] ShooterIT commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
ShooterIT commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1131621229

   Here an issue https://github.com/apache/incubator-kvrocks/issues/456 is needed to resolve


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1131684486

   Seems like the grammar of redis commands is a [regular grammar](https://en.wikipedia.org/wiki/Regular_grammar).
   But no sure.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] You can help Kvrocks to support more Redis commands [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/kvrocks/issues/595#issuecomment-3690976058

   Thank you for your list! It should be quite helpful to our work of Redis compatibility.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1131708536

   Here are some initial ideas.
   
   To parse `SET key value [ NX | XX] [GET] [ EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL]` ([ref](https://redis.io/commands/set/)):
   
   ```
   #define CHECK(x) if(!x.ok()) return parse fail
   
   iter = parsing iterator(args...);
   
   CHECK(iter.pick_str(&key)); // insure the arg exists
   CHECK(iter.pick_str(&value));
   
   if(iter.pick_eq("NX")) {
     set nx flag...
   } else if(iter.pick_eq("XX")) {
     set xx flag...
   }
   
   if(iter.pick_eq("GET")) {
     process...
   }
   
   if(iter.pick_eq("EX")) {
     CHECK(iter.pick_int(&seconds));
   } else if(iter.pick_eq("PX")) {
     CHECK(iter.pick_int(&mseconds));
   } else if(iter.pick_eq("EXAT")) {
     CHECK(iter.pick_int(&utseconds));
   } else if(iter.pick_eq("PXAT")) {
     CHECK(iter.pick_int(&utmseconds));
   } else if(iter.pick_eq("KEEPTTL")) {
      ...
   }
   
   CHECK(iter.end()); // remains no arg
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #595: You can help Kvrocks to support more Redis commands

Posted by GitBox <gi...@apache.org>.
git-hulk commented on issue #595:
URL: https://github.com/apache/incubator-kvrocks/issues/595#issuecomment-1132366113

   It looks better than before, this idea is really nice to me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] You can help Kvrocks to support more Redis commands [kvrocks]

Posted by "Valay17 (via GitHub)" <gi...@apache.org>.
Valay17 commented on issue #595:
URL: https://github.com/apache/kvrocks/issues/595#issuecomment-3690944458

   Here's a list of commands not present in kvrocks(https://kvrocks.apache.org/docs/supported-commands/) compared to Redis 8.4(https://redis.io/docs/latest/commands/redis-8-4-commands/) as of 24/12/2026:
   
   ACL CAT
   ACL DELUSER
   ACL DRYRUN
   ACL GENPASS
   ACL GETUSER
   ACL LIST
   ACL LOAD
   ACL LOG
   ACL SAVE
   ACL SETUSER
   ACL USERS
   ACL WHOAMI
   BGREWRITEAOF
   CLIENT CACHING
   CLIENT GETNAME
   CLIENT GETREDIR
   CLIENT ID
   CLIENT INFO
   CLIENT KILL
   CLIENT LIST
   CLIENT NO
   CLIENT NO
   CLIENT PAUSE
   CLIENT REPLY
   CLIENT SETINFO
   CLIENT SETNAME
   CLIENT TRACKING
   CLIENT TRACKINGINFO
   CLIENT UNBLOCK
   CLIENT UNPAUSE
   CLUSTER ADDSLOTS
   CLUSTER ADDSLOTSRANGE
   CLUSTER BUMPEPOCH
   CLUSTER COUNT
   CLUSTER COUNTKEYSINSLOT
   CLUSTER DELSLOTS
   CLUSTER DELSLOTSRANGE
   CLUSTER FAILOVER
   CLUSTER FLUSHSLOTS
   CLUSTER FORGET
   CLUSTER GETKEYSINSLOT
   CLUSTER INFO
   CLUSTER KEYSLOT
   CLUSTER LINKS
   CLUSTER MEET
   CLUSTER MIGRATION
   CLUSTER MYID
   CLUSTER MYSHARDID
   CLUSTER NODES
   CLUSTER REPLICAS
   CLUSTER REPLICATE
   CLUSTER RESET
   CLUSTER SAVECONFIG
   CLUSTER SET
   CLUSTER SETSLOT
   CLUSTER SHARDS
   CLUSTER SLAVES
   CLUSTER SLOT
   CLUSTER SLOTS
   COMMAND COUNT
   COMMAND DOCS
   COMMAND GETKEYS
   COMMAND GETKEYSANDFLAGS
   COMMAND INFO
   COMMAND LIST
   CONFIG GET
   CONFIG RESETSTAT
   CONFIG REWRITE
   CONFIG SET
   DELEX
   DIGEST
   FAILOVER
   FT.AGGREGATE
   FT.ALIASADD
   FT.ALIASDEL
   FT.ALIASUPDATE
   FT.ALTER
   FT.CONFIG GET
   FT.CONFIG SET
   FT.CURSOR DEL
   FT.CURSOR READ
   FT.DICTADD
   FT.DICTDEL
   FT.DICTDUMP
   FT.EXPLAINCLI
   FT.HYBRID
   FT.PROFILE
   FT.SPELLCHECK
   FT.SYNDUMP
   FT.SYNUPDATE
   FUNCTION DELETE
   FUNCTION DUMP
   FUNCTION FLUSH
   FUNCTION KILL
   FUNCTION LIST
   FUNCTION LOAD
   FUNCTION RESTORE
   FUNCTION STATS
   Hash commands
   HEXPIRE
   HEXPIREAT
   HEXPIRETIME
   HGETDEL
   HGETEX
   HPERSIST
   HPEXPIRE
   HPEXPIREAT
   HPEXPIRETIME
   HPTTL
   HSETEX
   HTTL
   JSON.DEBUG MEMORY
   LATENCY DOCTOR
   LATENCY GRAPH
   LATENCY HISTOGRAM
   LATENCY HISTORY
   LATENCY LATEST
   LATENCY RESET
   LOLWUT
   MEMORY DOCTOR
   MEMORY MALLOC
   MEMORY PURGE
   MEMORY STATS
   MEMORY USAGE
   MODULE LIST
   MODULE LOAD
   MODULE LOADEX
   MODULE UNLOAD
   MSETEX
   OBJECT ENCODING
   OBJECT FREQ
   OBJECT IDLETIME
   OBJECT REFCOUNT
   PFDEBUG
   PFSELFTEST
   PSYNC
   PUBSUB CHANNELS
   PUBSUB NUMPAT
   PUBSUB NUMSUB
   PUBSUB SHARDCHANNELS
   PUBSUB SHARDNUMSUB
   REPLCONF
   SAVE
   SCRIPT DEBUG
   SCRIPT EXISTS
   SCRIPT FLUSH
   SCRIPT KILL
   SCRIPT LOAD
   SLOWLOG GET
   SLOWLOG LEN
   SLOWLOG RESET
   SMISMEMBER
   SORT_RO
   SPUBLISH
   SWAPDB
   SYNC
   TOUCH
   TS.ALTER
   TS.DELETERULE
   VADD
   VCARD
   VDIM
   VEMB
   VGETATTR
   VINFO
   VISMEMBER
   VLINKS
   VRANDMEMBER
   VRANGE
   VREM
   VSETATTR
   VSIM
   WAITAOF
   XACKDEL
   XDELEX
   XGROUP CREATE
   XGROUP CREATECONSUMER
   XGROUP DELCONSUMER
   XGROUP DESTROY
   XGROUP SETID
   XINFO CONSUMERS
   XINFO GROUPS
   XINFO STREAM
   ZDIFF
   ZDIFFSTORE
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org