Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement COPY #3878

Open
adiholden opened this issue Oct 6, 2024 · 6 comments
Open

implement COPY #3878

adiholden opened this issue Oct 6, 2024 · 6 comments
Labels
hacktoberfest Participates in Hacktoberfest help wanted Extra attention is needed

Comments

@adiholden
Copy link
Collaborator

https://redis.io/docs/latest/commands/copy/

@adiholden adiholden added help wanted Extra attention is needed hacktoberfest Participates in Hacktoberfest labels Oct 6, 2024
@MahendraDani
Copy link

@adiholden I would like to work on this issue.
Would you please tell me how should I approach this issue?

@chakaz
Copy link
Collaborator

chakaz commented Oct 7, 2024

@MahendraDani thanks for your interest in contributing to Dragonfly!
I'd take a look at the MOVE command implementation (here) and do something similar, without the removal of the original key.

@MahendraDani
Copy link

@chakaz Is there any guide for setting up the project locally?

@chakaz
Copy link
Collaborator

chakaz commented Oct 7, 2024

https://github.com/dragonflydb/dragonfly/blob/main/docs/build-from-source.md

@sanathkandikanti
Copy link

sanathkandikanti commented Oct 27, 2024

Hi, I have a question about the debug check in db_slice.cc

DCHECK(!obj.IsRef());

From what I understand, AsRef() creates a copy of the original object using memcpy, even though its name suggests it returns a reference. Given this implementation, is this debug validation necessary?

memcpy(&res.u_, &u_, sizeof(u_));

CC: @chakaz @adiholden @romange

@chakaz
Copy link
Collaborator

chakaz commented Nov 10, 2024

Hi @sanathkandikanti, line 978 you quoted here is merely a DCHECK (i.e. checks an assumption in debug builds) to make sure obj is a reference, it's not calling AsRef(). Did I misunderstood you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Participates in Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants