kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Add support of the command MOVE

Open PragmaTwice opened this issue 2 years ago • 11 comments

Refer to https://redis.io/commands/move/

PragmaTwice avatar Dec 18 '23 15:12 PragmaTwice

Kvrocks don't have DB, we have namespace instead. So should we use namespace token in this command?

move key namespace_token

jihuayu avatar Dec 19 '23 04:12 jihuayu

Kvrocks don't have DB, we have namespace instead. So should we use namespace token in this command?

move key namespace_token

Looks good to me. cc @git-hulk

PragmaTwice avatar Dec 19 '23 13:12 PragmaTwice

Kvrocks don't have DB, we have namespace instead. So should we use namespace token in this command?

move key namespace_token

Looks good to me. cc @git-hulk

Good to me +1

git-hulk avatar Dec 19 '23 13:12 git-hulk

proposal is ok to me

mapleFU avatar Dec 19 '23 14:12 mapleFU

This command was implemented by @enjoy-binbin in #1723 but now it is a dummy command. Are we sure to change the actual operation of the command which is different from Redis?

kay011 avatar Dec 29 '23 08:12 kay011

I think it’s better to keep the redis style MOVE key db.

If we specifially need such a feature, we should add a new command, or at least do it in a way that is compatible with redis style.

enjoy-binbin avatar Jan 05 '24 15:01 enjoy-binbin

@enjoy-binbin Add a new command looks good to me.

I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

jihuayu avatar Jan 05 '24 22:01 jihuayu

@enjoy-binbin Add a new command looks good to me.

I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

This has not been implemented right? I'll work on this.

haanhvu avatar Feb 21 '24 17:02 haanhvu

@enjoy-binbin Add a new command looks good to me. I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

This has not been implemented right? I'll work on this.

No. But let's check with @git-hulk @PragmaTwice to make sure this is the ok behavior.

jihuayu avatar Feb 21 '24 23:02 jihuayu

I'm fine with @enjoy-binbin solution. BTW, we must forbid using this command if the cluster mode is enabled.

git-hulk avatar Feb 22 '24 01:02 git-hulk

Hi @haanhvu, according to @git-hulk's suggestion, we can use @enjoy-binbin's solution. You can add a new command. Be bold in doing it, and feel free to continue raising questions here if any.

I think it’s better to keep the redis style MOVE key db. If we specifially need such a feature, we should add a new command, or at least do it in a way that is compatible with redis style.

jihuayu avatar Feb 26 '24 03:02 jihuayu

@enjoy-binbin Add a new command looks good to me. I provide a compatible solution: When command args size is 3, MOVE key db , we treat it a dummy command. When command args size is 4, MOVE key ns_name ns_token ,we move it to new namespace.

This has not been implemented right? I'll work on this.

Are you still working on this?

Chiro11 avatar Apr 03 '24 16:04 Chiro11

Hi @Chiro11 It seems like nobody has work now. If you want to do it, you can send a PR directly.

jihuayu avatar Apr 04 '24 06:04 jihuayu