dice icon indicating copy to clipboard operation
dice copied to clipboard

Add support for `RANDOMKEY` Command

Open JyotinderSingh opened this issue 1 year ago • 20 comments

We need to implement the RANDOMKEY command similar to the RANDOMKEY command in Redis. Please refer to the following commit in Redis to understand the implementation specifics - source.

  1. Write unit and integration tests for the command referring to the tests written in the Redis codebase 7.2.5.
  2. For integration tests, you can refer to the tests folder. Note: they have used TCL for the test suite, and we need to port that to our way of writing integration tests using the relevant helper methods. Please refer to our tests directory.
  3. For the command, benchmark the code and measure the time taken and memory allocs using benchmem and try to keep them to the bare minimum.

JyotinderSingh avatar Aug 06 '24 12:08 JyotinderSingh

Please assign this to me, i will understand code base first. Good for initial understanding of code flow, I have un-assign myself from other issue.

codeimmortal avatar Aug 06 '24 15:08 codeimmortal

Please assign this to me, i will understand code base first. Good for initial understanding of code flow, I have un-assign myself from other issue.

Assigned

JyotinderSingh avatar Aug 07 '24 14:08 JyotinderSingh

@codeimmortal if you are not working on this, can I pick this one?

rkarthick15 avatar Aug 11 '24 09:08 rkarthick15

@JyotinderSingh / @soumya-codes - Can you please assign this issue? Would like to try the SCAN approach to get the next valid key for this issue.

ArjunMenonPe avatar Sep 07 '24 18:09 ArjunMenonPe

This is yours @ArjunMenonPe . Thanks for picking this up.

AshwinKul28 avatar Sep 07 '24 18:09 AshwinKul28

Hello @ArjunMenonPe,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

arpitbbhayani avatar Sep 13 '24 06:09 arpitbbhayani

Hello @ArjunMenonPe,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

@arpitbbhayani I would like to pick this, if there has been no activity. Thanks

Vidyap23 avatar Sep 14 '24 15:09 Vidyap23

@JyotinderSingh @soumya-codes Could you please assign this to me?

Vidyap23 avatar Sep 18 '24 14:09 Vidyap23

@JyotinderSingh @soumya-codes Could you please assign this to me?

Assigned, thanks for picking this up. However, please keep in mind that implementing RANDOMKEY in our setup has proven to be a little challenging up until now, particularly due to the data structures we are using internally. Feel free to discuss any blockers on the Discord channel.

JyotinderSingh avatar Sep 18 '24 14:09 JyotinderSingh

@JyotinderSingh @soumya-codes Could you please assign this to me?

Assigned, thanks for picking this up. However, please keep in mind that implementing RANDOMKEY in our setup has proven to be a little challenging up until now, particularly due to the data structures we are using internally. Feel free to discuss any blockers on the Discord channel.

Thank you. Sure, I will do that.

Vidyap23 avatar Sep 18 '24 14:09 Vidyap23

@JyotinderSingh @soumya-codes Could you please assign this to me?

Assigned, thanks for picking this up. However, please keep in mind that implementing RANDOMKEY in our setup has proven to be a little challenging up until now, particularly due to the data structures we are using internally. Feel free to discuss any blockers on the Discord channel.

Thank you. Sure, I will do that.

https://discord.gg/xAqKy3jw

JyotinderSingh avatar Sep 18 '24 14:09 JyotinderSingh

Just wanted to give an update, I am still working on it and hope to raise a PR tomorrow

Vidyap23 avatar Sep 24 '24 15:09 Vidyap23

Hey @Vidyap23, just stumbled upon this, and read the RANDOMKEY implementation of Redis. Are you working on this? If yes, how are you making sure that this command runs in O(1) with current DB methods (store/store.store() methods) we currently have in DiceDB?

iamskp11 avatar Sep 29 '24 15:09 iamskp11

Hey, if this is open I would like to work on it. I was tinkering around and kindof have a working prototype. But will need to discuss some trade-offs before initiating the PR

xanish avatar Sep 30 '24 05:09 xanish

Hello @Vidyap23,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

arpitbbhayani avatar Oct 09 '24 02:10 arpitbbhayani

Hey @JyotinderSingh , would like to figure out how we can do it in O(1) or similar. Please assign to me.

iamskp11 avatar Oct 09 '24 02:10 iamskp11

Hello @xanish,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

arpitbbhayani avatar Oct 24 '24 13:10 arpitbbhayani

Hey @arpitbbhayani I have initiated the MR, just waiting for confirmation if it can be merged or needs any further changes.

xanish avatar Oct 24 '24 15:10 xanish

Hey @JyotinderSingh , may I work on this issue since it has been inactive for quite a while?

yaten2302 avatar Dec 16 '24 14:12 yaten2302

Hey @JyotinderSingh , may I work on this issue since it has been inactive for quite a while?

This issue does not require further work at this time.

JyotinderSingh avatar Dec 16 '24 16:12 JyotinderSingh