-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Command Migration: ('INCR', 'INCRBY', 'INCRBYFLOAT', 'DECR', 'DECRBY') #1016
Comments
@AshwinKul28 I would like to give this a try, Can you pls assign this to me. |
Hi @AshwinKul28, can I pick this up? |
HI @pg30 go for it. Thanks for picking this up. 🚀 @anchalsinghrajput Thanks for your interest. please pick other opened issues. There are many for command migration. |
In the old implementation of INCR command :
|
I am not able to find the unit tests for the existing implementations of INCR, INCRBY, DECR, DECRBY and thus will be adding all of those in the same PR. |
HI @pg30 thanks for the updates. Yes please make it as close as Redis, also go ahead and add unit test cases. Although I can see few of them are covered in the |
Hey @AshwinKul28 , Just a suggestion |
@pg30 hope you are doing well. Any updates on the progress? We are targeting these issues little aggressively as we maintaining the commands across two separate server implementations is getting very cumbersome. |
Hii, |
* migrated incr commands * fixed test cases * fixed integration tests * fixed linting issues * updated docs and added error for consistency with redis * fixed integration tests * fixed * updated docs * integration tests * update * integration tests * added integration tests * tests * fix * added integration tests for websocket * updated docs:
This issue tracks the migration of the mentioned commands - ('INCR', 'INCRBY', 'INCRBYFLOAT', 'DECR', 'DECRBY') to make them compatible across the three protocols supported by the Dice database: RESP, HTTP, and WebSocket.
DiceDB now supports more than one protocols (Resp/http/websocket). We don't want eval operation of each command to be strictly bound with any of the protocols. Currently eval function return statements of each command is bounded to the RESP protocol.
The migration is required because:
The goal is to make the command logic protocol-independent, allowing all three protocols to call the same core functionality seamlessly.
Requirements
[Command Name]
to be generic.Migration Steps
Analyze Current Implementation
Refactor Return Logic
evalXXX(args []string, store *dstore.Store) *EvalResponse
under the file/internal/eval/store_eval.go
/errors/migrated_errors.go
file/internal/clientio/resp.go
file as RespType variablesCommand/Worker specific Changes
IsMigrated
flag to true in the commands information under/internal/eval/commands.go
file.NewEval
parameter in the same command structure./internal/eval/eval.go
file./internal/worker/CommandsMeta
map and make it's type asSingleShard
Update Unit Tests
Integration Tests
Checklist
Additional Notes
If there are any questions or concerns about this migration, please mention them here.
Related Issues/PRs
The text was updated successfully, but these errors were encountered: