kvrocks
kvrocks copied to clipboard
Add support of the command COPY
Refer to https://redis.io/commands/copy/
I want to try. Can you assign this to me?
Sure! Assigned.
May I know where I should write my unit tests?
@Qiaolin-Yu It's good to add Go tests only.
By the way, for the optional part [DB destination-db], what should I do to write the KV to the destination-db? Should I use RedisWriter::selectDB to implement?
Hi @Qiaolin-Yu , according to my observation KVROCKS doesn't have DB instead you can use namespace concept. Please verify with @git-hulk and @PragmaTwice
@MaheshMadushan You're right. The RENAME command also has similar issue, so we can use the namespace in those commands.
@MaheshMadushan You're right. The RENAME command also has similar issue, so we can use the namespace in those commands.
@git-hulk Maybe not the RENAME command, but the MOVE command
@jihuayu Sorry for the wrong information. Yes, that's MOVE command instead of RENAME.
By the way, for the optional part
[DB destination-db], what should I do to write the KV to thedestination-db? Should I useRedisWriter::selectDBto implement?
@Qiaolin-Yu Hi, are you still working on this issue?
@git-hulk I think you can assign it to me now 'cause he hasn't responded for two months. This cmd is similar to MOVE and RENAME, suitable for me.
@Chiro11 Thank you!
@git-hulk To adapt to kvrocks, it may need to make minor modifications.
redis ver: COPY source destination [DB destination-db] [REPLACE]
I think we can replace 'DB' with 'NS'/'NAMESPACE'/'TO', or keep it, and replace destination-db to token.
What do you think?
@Chiro11 Perhaps we can support the [DB](DB must be 0) first and copy between namespaces should be implemented as COPYX.