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

IronHawk Port: EXISTS command #1430

Closed
4 tasks
arpitbbhayani opened this issue Jan 29, 2025 · 6 comments
Closed
4 tasks

IronHawk Port: EXISTS command #1430

arpitbbhayani opened this issue Jan 29, 2025 · 6 comments

Comments

@arpitbbhayani
Copy link
Contributor

We reimplemented the core of the DiceDB engine and re-wrote - the wire protocol, execution engine, and config management. This rewrite helped us gain 32% throughput over our existing benchmark. One of the core principles we focussed on was to make code easy to extend and debug. As an effort, we need to migrate the command from the old engine to IronHawk.

Here are the exact things to be taken care of to migrate the command EXISTS

  1. setup DiceDB server locally from the source - instructions
  2. setup DiceDB CLI locally from the source - instructions

Steps to execute

Start the DiceDB server with IronHawk engine

$ go run main.go --engine ironhawk --log-level debug

Start the DiceDB CLI with the IronHawk engine

$ go run main.go --engine ironhawk

Porting the command

  1. Find the current implementation of the command, the name of the function will be evalEXISTS. ex: evalSET, evalGET, etc. Most of them are present in the store_eval.go file.
  2. Create a new file internal/cmd/cmd_exists.go and follow the structure as cmd_get.go, cmd_set.go, and cmd_ping.go files.
  3. Reimplement the old evalEXISTS function into a new file, Make a note of the return values of the new function.
  4. If you think the implementation is complex, feel free to simplify
  5. Document the code you have written and make sure it adheres to existing standard
  6. Add TODO in the comment, if you feel there are things that need to be implemented later
  7. Cover all possible cases for the command implementation
  8. Do not delete the old implementation of the eval function

No need to write test cases for this new implementation. We will take care of this in one shot later. If the test fails, it is okay.

If you find any other bug while you are implementing it, you can either

  1. fix it yourself and submit it in a new PR
  2. raise a GitHub issue

Follow the contribution guidelines

These are general guidelines to follow before you submit a patch. Please mark them as done
once you complete them

@helios2003
Copy link
Contributor

Could you assign this issue to me?

@2307vivek
Copy link

2307vivek commented Jan 30, 2025

Is someone already working on this? I want to wok on this.

@helios2003
Copy link
Contributor

Yes, I am working on this

@SeanChinJunKai
Copy link
Contributor

Hi @helios2003 , are you still working on this?

@helios2003
Copy link
Contributor

Yes, I have asked a doubt I faced on the Discord. Also I remain relatively busy during the weekdays and can make progress during weekends. Thanks for understanding.

@arpitbbhayani
Copy link
Contributor Author

#1447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants