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

#1020 Migrate SADD, SREM, SCARD, SMEMBERS command to store_eval #1068

Merged
merged 44 commits into from
Nov 6, 2024

Conversation

sahoss
Copy link
Contributor

@sahoss sahoss commented Oct 11, 2024

Description
Migrates the eval functions for SADD, SREM, SMEMBERS, SCOUNT to the new eval function type (#1020)

Checklist

  • Migrated the evalXXX function with the latest definition
  • Update or add unit tests for the new implementation.
  • All unit tests pass successfully.
  • Ensure all integration tests pass successfully.
  • Ensure integration tests are added for the migrated command on multi-threaded resp server.
  • Move Integration tests for the respective commands under the RESP integration tests directory from Async directory
  • Please validate that the documentation for the respective commands is up to date. If not then consider adding them.

@sahoss sahoss marked this pull request as ready for review October 11, 2024 15:38
@AshwinKul28
Copy link
Contributor

AshwinKul28 commented Oct 11, 2024

HI @sahoss changes look good. 🚀 left a minor comment.

Please pull the latest from the master to resolve the linter issue. Thanks

internal/eval/store_eval.go Outdated Show resolved Hide resolved
@AshwinKul28 AshwinKul28 added the migration -- command Migrates current eval to a refactored eval for all protocols functionality label Oct 12, 2024
@AshwinKul28
Copy link
Contributor

HI @sahoss Thanks for the changes, LGTM! Please add migration for 'SMEMBERS', 'SCARD' also in the same PR.

@sahoss sahoss changed the title Migrate SADD command to store_eval Migrate SADD, SREM, SCARD, SMEMBERS command to store_eval Oct 13, 2024
@sahoss
Copy link
Contributor Author

sahoss commented Oct 13, 2024

@AshwinKul28 added the remaining commands. however, i still see lint errors locally and i have merged latest master into my branch. its not from my changes. ok to ignore?
image

@AshwinKul28
Copy link
Contributor

Hi @sahoss thanks a lot for the changes. Can you please add unit tests for each eval? It's not present already but you can add new unit tests for each command in the eval_test.go Also please rebase it with master.

@soumya-codes
Copy link
Contributor

soumya-codes commented Oct 15, 2024

@sahoss lets ensure that the corresponding integration tests are migrated as well. cc @AshwinKul28

@sahoss
Copy link
Contributor Author

sahoss commented Oct 15, 2024

@AshwinKul28 / @soumya-codes - sure. it will take me until this weekend potentially to make those changes. just a heads up

@soumya-codes
Copy link
Contributor

Just FYI, we need to add the tests for the migrated commands under integration_tests/commands/resp

I have added a new item to checklist in the PR description. Please tick the same once the integration tests are added.
Please let me or Ashwin know if you have any doubts/concern.

@AshwinKul28
Copy link
Contributor

HI @sahoss Hope you're doing well, Do you still have any blockers on this? Let me know and we can resolve them quickly and try to merge the PR. thanks a lot for all the efforts.

@sahoss
Copy link
Contributor Author

sahoss commented Oct 26, 2024

@AshwinKul28 i had a question for you here #1068 (comment).

i am working in parallel to refresh the documentation.

@sahoss
Copy link
Contributor Author

sahoss commented Oct 28, 2024

doc refresh pr @ DiceDB/docs#116

@AshwinKul28
Copy link
Contributor

Thanks @sahoss for the documentation refresh. I have left a single comment on the docs PR! Otherwise, is everything related to the migration sorted, or are HTTP tests failing?

@sahoss
Copy link
Contributor Author

sahoss commented Oct 30, 2024

@AshwinKul28 everything should be passing now. i have addressed the documentation PR comment

Copy link
Contributor

@apoorvyadav1111 apoorvyadav1111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fantastic effort. Left few comments. In addition to resp, please add test cases in websocket and HTTP. Thanks.

@AshwinKul28
Copy link
Contributor

@sahoss Please address above requested changes by Apoorv, then we are good to merge. thanks

Copy link
Contributor

@apoorvyadav1111 apoorvyadav1111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, looks good to me

@apoorvyadav1111 apoorvyadav1111 changed the title Migrate SADD, SREM, SCARD, SMEMBERS command to store_eval #1020 Migrate SADD, SREM, SCARD, SMEMBERS command to store_eval Nov 5, 2024
Copy link
Contributor

@AshwinKul28 AshwinKul28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Thanks a lot @sahoss for the efforts and thanks @apoorvyadav1111 for the last minute conflict resolutions.

@AshwinKul28
Copy link
Contributor

@apoorvyadav1111 still 1 conflict in the store eval file :(

@sahoss
Copy link
Contributor Author

sahoss commented Nov 6, 2024

@apoorvyadav1111 still 1 conflict in the store eval file :(

i have fixed the conflict.

thanks @apoorvyadav1111 @AshwinKul28 for your detailed reviews. appreciate your time and effort on this pr.

internal/eval/deque_test.go Outdated Show resolved Hide resolved
@apoorvyadav1111
Copy link
Contributor

Hi @sahoss , apologies for commiting and reverting the deque test change. We recently migrated to this package and would not want to revert the efforts and reopen another issue to migrate again. I fixed the issue, it was a call to old assert package, which could have been reverted as part of recent merge.

@AshwinKul28 Thanks for your review. I am merging this as the changes after your review are minimal and we don't want another conflict. Thank you both for making this change into main.

@apoorvyadav1111 apoorvyadav1111 merged commit 3866213 into DiceDB:master Nov 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration -- command Migrates current eval to a refactored eval for all protocols functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command Migration: ('SADD', 'SREM', 'SMEMBERS', 'SCARD')
5 participants