apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
https://kvrocks.apache.org/
Apache License 2.0
3.49k stars 456 forks source link

You can help Kvrocks to support more Redis commands #595

Open ShooterIT opened 2 years ago

ShooterIT commented 2 years ago

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 can firstly open an issue for it (if it is not already created by others).

Here are the basic steps to implement a new command for your reference.

  1. Implement the storage algorithm in types/redis_xx.cc (redis_hash.cc, redis_list.cc, redis_zset.cc, ...) and command parsing/executing class in commands/cmd_xx.cc (cmd_string.cc, cmd_set.cc, ...), you can refer other similar commands.
  2. Add c++ and golang tests (unit tests, and integration tests if necessary).

Are you willing to submit a PR?

ShooterIT commented 2 years ago

Here an issue #456 is needed to resolve

move comments from @PragmaTwice to #456 to trace

boatrainlsz commented 1 year ago

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